المشاركات

Laravel Auth logout not working -- Before posted Answer for this question are not working in my case

I have developed small application for Auth learning purpose where everything works fine Login Logout and Dashboard page. But Case1 once after clicking on logout, try to access dashboard page by editing url in browser it goes to dashboard page which is wrong. Case2 when i cleare cache and browsing data and try to access dashboard it works fine and redirect for login which is correct. I am using Auth::logout for logged out Following is my code web.php Route::get('/', function () { return view('welcome'); }); Route::get('/login','AuthenticationController@login')->name('login'); Route::post('/login.submit','AuthenticationController@getLogIn')-> name('login.submit'); Route::get('/register','AuthenticationController@register')->name('register'); Route::post('/register.submit','AuthenticationController@addUser')-> name('register.submit'); Route::get('/logout&#

Eloquent has() method counts soft deleted rows

using $users = User::has('comments','>=',3); in Laravel 5.6 returns users with more than 3 comments but counts soft deleted comments, while I want the list of users who have more than 3 active comments. from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3m5FvUc via IFTTT

Undefined variabel : shop view at foreach list item shop

Here this is the error Here this is the error ==== cart.blade.php I'm confused to make the page go directly to the shopping list. the error here says the shop variable is not defined in the loop to display items that have been added to the cart. but the data is already entered into the database <div class="container"> <div class="row mb-5"> <form class="col-md-12" method="post"> <div class="site-blocks-table"> <table class="table table-bordered"> <thead> <tr> <th class="product-thumbnail">Image</th> <th class="product-name">Product</th> <th class="product-price">Price</th> <th class="product-quantity">Quant

Error with composer update does not comply with psr-4 autoloading standard. Skipping

I have this error when i run composer update Class MercadoPago\AdvancedPayments\AdvancedPayment located in C:/xampp/htdocs/vendor/mercadopago/dx-php/src/MercadoPago\Entities\AdvancedPayments\AdvancedPayment.php does not comply with psr-4 autoloading standard. Skipping. how is it solved? from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3AGj2kM via IFTTT

Array Merge with condition

Array 1: [ { "product_name": "Redme note 7" "quantity": "548.00" "purchase_price": "10000.00" "product_id": 1 } { "product_name": "Redme note 7" "quantity": "150.00" "purchase_price": "19000.00" "product_id": 1 } { "product_name": "Fresh Water 5 Litre" "quantity": "20.00" "purchase_price": "70.00" "product_id": 2 } { "product_name": "Fresh Water 5 Litre" "quantity": "348.00" "purchase_price": "80.00" "product_id": 2 } { "product_name": "Fresh Water 5 Litre" "quantity": "1067.00&qu

Php artisan schedule:run only once execute command in localhost

I created a command artisan to make a text file in my path. This command executes correctly by running the command but not for task scheduling in my localhost (not server). CreateFile class : protected $signature = 'create:file'; public function handle() { $myfile = fopen("newfile.txt", "w") or die("Unable to open file!"); $txt = "parisa"; fwrite($myfile, $txt); fclose($myfile); } Kernel.php : protected $commands = [ Commands\CreateFile::class, ]; protected function schedule(Schedule $schedule) { $schedule->command('create:file')->everyMinute(); } When I run php artisan schedule:run my command executes only once at that moment. But I want to execute every minute. How to fix it? from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2VPMiXg via IFTTT