Last active
December 30, 2020 09:30
-
-
Save xyzkpz/c5efa252a4749e47b33fa5665ddc6ccf to your computer and use it in GitHub Desktop.
laravel collection of packages with installations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------- LIST OF ESSENTIAL PACKAGES USED IN PHP TO CREATE PROJECT FASTER IN LARAVEL ------------------------ | |
------------------- PACKAGE 1 ------------------- | |
http://image.intervention.io/getting_started/installation | |
------------------- PACKAGE 1 ------------------- | |
INSTALLL USING IN PROJECT IN CMD | |
composer require intervention/image | |
THEN ADD below 2 lines INSIDE CONFIG/APP.PHP | |
In the $providers array add the service providers for this package. | |
copy and paste >>>>>> Intervention\Image\ImageServiceProvider::class <<<<<<<<<<< | |
Add the facade of this package to the $aliases array. | |
copy and paste >>>>>> 'Image' => Intervention\Image\Facades\Image::class <<<<<<<<<<<<< | |
------------------------------------------------------------------------------------------------------------------------------- | |
------------------- PACKAGE 2 ------------------- | |
https://unisharp.github.io/laravel-filemanager/installation | |
------------------- PACKAGE 2 ------------------- | |
first run this in bash for install | |
$ composer require unisharp/laravel-filemanager | |
---------so when you install this package it will give an error read below article and fix the issue | |
or goto php.ini then uncomment below | |
-- article--- https://laraveldeve.blogspot.com/2019/02/problem-with-installing-exif-php.html | |
extension=mbstring | |
extension=exif | |
extension=openssl | |
extension=fileinfo | |
extension=curl | |
once you uncomment then try again run it works.. | |
$ composer require unisharp/laravel-filemanager | |
install package | |
composer require unisharp/laravel-filemanager | |
(optional) Edit config/app.php : | |
* For Laravel 5.5 and up, skip to step 3. All service providers and facades are automatically discovered. | |
Add service providers | |
>>>>>>>>>>> UniSharp\LaravelFilemanager\LaravelFilemanagerServiceProvider::class, <<<<<<<<<<< | |
>>>>>>>>>>>>>>> Intervention\Image\ImageServiceProvider::class,<<<<<<<<<<<<< | |
And add class aliases | |
>>>>>>>>>>>>>> 'Image' => Intervention\Image\Facades\Image::class, <<<<<<<<<<<< | |
Code above is for Laravel 5.1. In Laravel 5.0 should leave only quoted class names. | |
Publish the package’s config and assets : | |
$ php artisan vendor:publish --tag=lfm_config | |
$ php artisan vendor:publish --tag=lfm_public | |
------------------------------------------------------------------------------------------------------------------------------- | |
------------------- PACKAGE 3 ------------------- | |
https://github.com/UniSharp/laravel-ckeditor | |
------------------- PACKAGE 3 ------------------- | |
Set up package | |
$ composer require unisharp/laravel-ckeditor | |
For Laravel 5.5+ you can skip this step. | |
For Laravel 5.4 and earlier edit config/app.php, add the following file to Application Service Providers section. | |
copy paste >>>>>>>>>>>> Unisharp\Ckeditor\ServiceProvider::class, <<<<<<<<<<<<< | |
------------------- PACKAGE 4 ------------------- | |
https://laravelcollective.com/docs/5.4/html#labels | |
------------------- PACKAGE 4 ------------------- | |
Go yo your terminal and run | |
$ composer update laravelcollective/html | |
Step 2 Add the Form and HTML facades and service provider. | |
Edit file app/config/app.php and add this line to providers array | |
Collective\Html\HtmlServiceProvider::class | |
Add the following aliases to aliases array in the same file. | |
‘Form’ => Collective\Html\FormFacade::class, | |
‘Html’ => Collective\Html\HtmlFacade::class, | |
------------------- PACKAGE 4 ------------------- | |
https://github.com/Zizaco/entrust | |
------------------- PACKAGE 4 ------------------- | |
----------type in git bash | |
kkish@rs MINGW64 /c/MAMP/htdocs/pro/mynews (master) | |
$ composer require zizaco/entrust": "5.2.x-dev | |
--------Open your config/app.php and add the following to the providers array: | |
Zizaco\Entrust\EntrustServiceProvider::class, | |
------- In the same config/app.php and add the following to the aliases array: | |
'Entrust' => Zizaco\Entrust\EntrustFacade::class, | |
---------Run the command below to publish the package config file config/entrust.php: | |
$ php artisan vendor:publish | |
$ type 9 in git bash | |
-------- Open your config/auth.php and add the following to it: | |
'providers' => [ | |
'users' => [ | |
'table' => 'users', | |
], | |
], | |
----------- If you want to use Middleware (requires Laravel 5.1 or later) you also need to add the following: | |
---------- add below lines in below file. routeMiddleware array in app/Http/Kernel.php. | |
'role' => \Zizaco\Entrust\Middleware\EntrustRole::class, | |
'permission' => \Zizaco\Entrust\Middleware\EntrustPermission::class, | |
'ability' => \Zizaco\Entrust\Middleware\EntrustAbility::class, | |
--------------- NOW GOTO VENDOR/ZIZACO/ENTRUST/SRC/COMMANDS/MIGRATIONCOMMAND.PHP | |
RENAME METHOD FROM fire() to handle() | |
------------- NOW generate the Entrust migration: | |
It will generate the <timestamp>_entrust_setup_tables.php migration. You may now run it with the artisan migrate command: | |
$ php artisan entrust:migration | |
------------ NOW RUN After the migration, four new tables will be present: | |
roles — stores role records | |
permissions — stores permission records | |
role_user — stores many-to-many relations between roles and users | |
permission_role — stores many-to-many relations between roles and permissions | |
Models | |
$ php artisan migrate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment