*Command
1 |
php artisan make:command UserGeneratorCommand --command = userGeneratorCommand |
in UserGenerator in
1 |
protected $signature = 'userGeneratorCommand'; and in handle() $this->line('Welcome to the user generator.'); |
add app/Console/Kernel.php
1 2 3 4 5 |
protected $commands = [ // 'App\Console\Commands\QuizStart', 'App\Console\Commands\UserGeneratorCommand', ]; |
and run in console
1 |
php artisan userGeneratorCommand |
https://code.tutsplus.com/tutorials/your-one-stop-guide-to-laravel-commands–net-30349
Alert
http://labs.abeautifulsite.net/archived/jquery-alerts/
For route group
Route::group(array(‘prefix’ => ‘admin’,’as’=>’admin’), function() {
// main page for the admin section (app/views/admin/dashboard.blade.php)
Route::get(‘/’, function () {
return ‘hi’;
});
// subpage for the posts found at /admin/posts (app/views/admin/posts.blade.php)
Route::get(‘/posts’, function()
{
return ‘bye’;
});
});
And in php pages
akash
For jQuery ajax
Add in header
And after jQuery
https://github.com/barryvdh/laravel-ide-helper
add
“barryvdh/laravel-ide-helper”: “~1.11”, –2.0.2 version working
composer require barryvdh/laravel-ide-helper
doctrine/dbal: ~2.3
composer require doctrine/dbal
Config\app.php
Add in
‘providers’ => [
‘Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider’
php artisan ide-helper:models
cd F:\xampp\htdocs\LaravelSqlServer
php.exe artisan InsertTest 1
Config\App.php =>’timezone’ => ‘Asia/Dhaka’,
composer require predis/predis
Namespace in route
Route::group(array(‘namespace’ => ‘Home’), function()
{
//
Route::get(‘/’, function()
{
return ‘Default User’;
});
Route::get(‘profile’, function()
{
return ‘Profile’;
});
});
Home controller
Route::group([‘prefix’ => ‘user’], function()
{
Route::get(‘/’, function()
{
return ‘user Prefix example’;
});
Route::get(‘profile’, function()
{
return ‘user Profile example’;
});
});
Route with user/
php artisan make:controller Mobile/MobileController
php artisan migrate
php artisan migrate:rollback