https://github.com/dr5hn/parcelg
ParcelG Admin APP with API Powered by Infyom Laravel Generator
https://github.com/dr5hn/parcelg
Last synced: 4 months ago
JSON representation
ParcelG Admin APP with API Powered by Infyom Laravel Generator
- Host: GitHub
- URL: https://github.com/dr5hn/parcelg
- Owner: dr5hn
- Created: 2019-07-21T10:16:04.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-02T07:23:39.000Z (over 5 years ago)
- Last Synced: 2025-02-11T08:26:22.611Z (4 months ago)
- Language: PHP
- Homepage: https://www.parcelg.com/
- Size: 3.34 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Parcel G
## Prerequisites
Git (Others) or GitBash (Windows)
PHP >= 7.1.3
PHP Extensions (OpenSSL, PDO, Mbstring, Tokenizer, XML, Ctype, JSON, BCMath)
[Composer](https://getcomposer.org/)
[NodeJS](https://nodejs.org/en/)
[Visual Studio Code](https://code.visualstudio.com/)## Cloning a Repository
### Cloning
```
git clone [email protected]:dr5hn/parcelg.git
cd parcelg
```### Create a `.env` file (Copy from .env.example) in `Root Folder` & Update DB & APP Config
Tip: Copy Content of .env.example and paste it into .env
(If text contains spaces, then encapsulate it with double quotes)
```
APP_NAME="ParcelG"
APP_ENV=local
APP_DEBUG=true
APP_URL=http://local.parcelg.comDB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=parcelg
DB_USERNAME=root
```### Directory Permissions (Except Windows)
```
sudo chmod -R 0777 storage/
sudo chmod -R 0777 bootstrap/cache
```### Installing Composer & Node Dependencies
```
composer install
npm install
```### Run Migration & Seeding
```
php artisan migrate
php artisan db:seed** specific migration and seeder**
php artisan migrate:refresh --path=/database/migrations/file_name
php artisan db:seed --class=UsersTableSeeder
```### Creating `public/.htaccess` (If not available)
**Apache :**
If the .htaccess file that ships with Laravel does not work with your Apache installation, try this alternative:
```Options +FollowSymLinks -Indexes
RewriteEngine OnRewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
```
**Nginx :**
If you are using Nginx, the following directive in your site configuration will direct all requests to the index.php front controller:
```
location / {
try_files $uri $uri/ /index.php?$query_string;
}
```### Generate APP Key
```
php artisan key:generate
```### Generate Passport Keys
```
php artisan passport:install
```### Compiling Controllers
```
composer dump-autoload
```### Starting the Engine
Tighten up the seatbelt and You're ready to ride...
```
php artisan serve
```## Caveats & Solutions
**Issue :** Specified key was too long error
**Solution :**
Edit your `app/Providers/AppServiceProvider.php` and inside the boot method set a default string length to 191.
```
use Illuminate\Support\Facades\Schema;public function boot()
{
Schema::defaultStringLength(191);
}
```**Issue :** symlink(): Permission denied
**Solution :**
Run following command
```
php artisan storage:link
```## Create a Migration File from DB
```
php artisan migrate:generate
```## Create a Seed From Data
```
php artisan iseed projects,project_logs,permission_role,permissions,menu_items,menus,data_types,data_rows,roles --force
```## Docker Fans
This application can be also run on docker
-- Development Friendly
-- Not for Production### PreRequisites
[Docker Desktop](https://www.docker.com/products/docker-desktop)
MySQL Workbench or Any Native MYSQL Tools except PHPMYADMIN### Play Commands
```
Start containers in background
$ docker-compose up -dStop containers
$ docker-compose killForce rebuild of Dockerfiles
$ docker-compose up -d --buildSee list of running containers
$ docker psDive inside container (Example : cms_app)
$ docker exec -ti [CONTAINER ID] bashRemove dangling/untagged images
$ docker images -q --filter dangling=true | xargs docker rmiRemove stopped containers
$ docker ps -aq --no-trunc -f status=exited | xargs docker rm
```### Access App
http://127.0.0.1:8080/### Access DB
Server : 127.0.0.1
User : root
Password : mysql
Port : 33061### Access Generator
http://localhost:8081/generator_builder### Access Routes
http://localhost:8081/routes### Access API Doc
http://localhost:8081/api/docs### Login
http://localhost:8081
user: [email protected]
pass: 12345678## References
https://labs.infyom.com/laravelgenerator/docs/6.0/installation