Skip to main content

Posts

Showing posts from January, 2020

Methods Laravel

 Use for navigation classes {{ Request::is('/') ? 'text-white bg-dark' : 'bg-light' }} -- FOR HOMEPAGE {{ Request::is('htmlform','htmlform/create') ? 'text-white bg-dark' : 'bg-light' }} -- FOR OTHER PAGES <a href="{{url('/')}}" class="list-group-item list-group-item-action {{ Request::is('/') ? 'text-white bg-dark' : 'bg-light' }}">Dashboard</a>         <a href="{{url('/')}}/htmlform" class="list-group-item list-group-item-action {{ Request::is('htmlform','htmlform/create') ? 'text-white bg-dark' : 'bg-light' }}">Manage Html Templates</a>

git commands

git branch git status git add filename git commit -m 'comment message' git push origin 'branch_name' git checkout master git pull origin master git merge 'branch_name' (Resolve error if any while merging ctrl+c, than :qa     afer resolve     git status     git add files     git commit - m 'update msg' ) git push origin master git checkout 'your branch name' git pull origin master git add app/* git add routes/web.php git add resources/*

Save image code Laravel

if($request->hasFile('category_image')) {             $image = $request->file('category_image');             $input['imagename'] = time().'.'.$image->getClientOriginalExtension();             $path1 = public_path('fundraiser_campaign');               if (!File::exists($path1)) {                   File::makeDirectory($path1, 0777, true);               }             $path2 = public_path('fundraiser_campaign/category');               if (!File::exists($path2)) {     ...

Laravel cmd commands

php artisan --version -- check laravel version   php artisan serve    -- to start laravel php artisan route:list    -- to show all the routes as defined in web.php php artisan make:controller TestController      --  to make new controller php artisan make:controller MovieController --resource                 ->  use command to make new controller with all crud operations in it php artisan make:migration create_books_table --create=books             -->  to create new table file in database/migrate folder php artisan migrate   -->  to create tables in database of created files in migrate folder php artisan help make:migration   -->  to check all commands in maigration php artisan migrate:refresh   -->   Reset ...