Skip to content

Instantly share code, notes, and snippets.

@moradi-morteza
Last active December 14, 2020 15:46
Show Gist options
  • Save moradi-morteza/0ecbb08c5311f28c6bd0c6e855d4c0e2 to your computer and use it in GitHub Desktop.
Save moradi-morteza/0ecbb08c5311f28c6bd0c6e855d4c0e2 to your computer and use it in GitHub Desktop.
[Laravel Start]
new laravel --auth
//add custom lib ----------------------------------------------------
npm install @fortawesome/fontawesome-free --save // icon library V:5.13
// in resource css app.scss add
@import '~@fortawesome/fontawesome-free/scss/fontawesome';
@import '~@fortawesome/fontawesome-free/scss/regular';
@import '~@fortawesome/fontawesome-free/scss/solid';
@import '~@fortawesome/fontawesome-free/scss/brands';
----------------------------------------------------------------
// sweet alert 2
npm install sweetalert2
//----------------------------------------------------
npm install bootstrap-select
@import "~bootstrap-select/sass/bootstrap-select"; // to app.scss
// in resource js app.js add
require('../../node_modules/bootstrap-select/dist/js/bootstrap-select');
require('../../node_modules/bootstrap-select/dist/js/i18n/defaults-fa_IR');
//----------------------------------------------------------
composer require laravel/helpers // method like str_random()
// For use FORM ClASS go to https://laravelcollective.com/docs/6.0/html
composer require laravelcollective/html
// php image handeling : http://image.intervention.io/
composer require intervention/image
// laravel ide helper https://github.com/barryvdh/laravel-ide-helper
composer require --dev barryvdh/laravel-ide-helper [ do instructinos to it work!]
// after install ide-helper and done instructions do bellow command
php artisan vendor:publish --provider="Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider" --tag=config
php artisan config:cache
php artisan ide-helper:generate
php artisan ide-helper:meta
php artisan ide-helper:models
invalidate and cache - and enable plugin laravel in phpstorm
// laravel debuger https://github.com/barryvdh/laravel-debugbar
composer require barryvdh/laravel-debugbar --dev
// artisan view : https://github.com/svenluijten/artisan-view
composer require sven/artisan-view --dev
// if you want to add a file like helpers.php with php methods
// in composer.json add :
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
],
"files": [
"app/helpers.php" //***
]
},
// then run command : composer dump-autoload
//------------------------------------------------------
// install jquery-ui
npm install jqury-ui --save
@import "~jquery-ui/themes/base/all.css";
import 'jquery-ui/ui/widgets/sortable'
npm install --save jscolor
// date picker ----------------------------------------
npm install persian-date@beta --save-dev
npm install persian-datepicker@beta
// slug -----------------------------------------------
composer require cviebrock/eloquent-sluggable // to change it for persian refer to slugpersian.php in lepton
npm run dev
// FINALY when you want to produce your final code :
// Run all Mix tasks and minify output...
npm run production
// for solve problem jqury
remove defer from app.js
chane :
window.$ = window.jQuery = require('jquery');
to
global.$ = global.jQuery = require('jquery');
// if you wan to user localhost/project/public
So I had to add to my webpack.mix.js:
mix.setPublicPath('public');
mix.setResourceRoot('../');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment