Getting ERROR 419 (unknown status) while uploading image Laravel 5.5

I am new in laravel and i am trying to integrate pl uploader inside for image uploading.I am getting unknown status error when i upload image.Here is the script i am using in view: var uploader = new plupload.Uploader({ runtimes : 'html5,flash,silverlight,html4', browse_button : 'bg_upload', // you can pass an id... container: document.getElementById('bg_container'), // ... or DOM Element itself url : "{{ url('/') }}/image-upload?_token="+$('meta[name="csrf-token"]').attr('content'), unique_names : false, ...Read more

laravel 5.5 - PHP Parse error: syntax error, unexpected '?' in helpers.php 233

When I create a new Laravel project, the browser displays an error 500. I found this in the log: PHP Parse error: syntax error, unexpected '?' in vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 233the code in 233 is:return app('cache')->get($arguments[0], $arguments[1] ?? null);But as i know, null coalescing operator( ?? ) is supported from PHP 7.0My PHP Version:PHP (cli) (built: Aug 4 2017 14:34:05) ( NTS )Copyright (c) 1997-2017 The PHP GroupZend Engine v3.1.0, Copyright (c) 19...Read more

laravel 5.5 - Cannot write in logs folder even after correct permissions

I am getting the error The stream or file "/opt/lampp/htdocs/project/storage/logs/laravel-date.log" could not be opened: failed to open stream: Permission deniedI have tried setting the permissions as both 777 and 775. I suddenly started getting this error. Here's the ls -l output of the project. drwxrwxr-x 15 root www-data 4096 Dec 2 2018 projectI am using XAMPP for my current development environment and not the native LAMPP stack....Read more

laravel 5.5 - Mail sending fails without errors

What do I have:Laravel app (5.5.45)MailgunI send mail like this://App\Listeners namespaceMail::to($event->user)->send(new Report($event->report));There are no errors in app logs. And there are no incoming mail in the Mailgun dashboard. And, obviously, no mail on my mailbox (spam too).I'm using debug bar, and when email sending is triggered, my mail appears in the debug bar.What have I tried:composer updateDelete Mailgun domain and create a new onephp artisan config:cacheUse Mailgun sandbox domainServe my Laravel app via HTTPS and HTTPN...Read more

laravel 5.5 - Auth::guard('memberweb')->user() returning null after redirection

I am using laravel-modules packages "" in order to better structure my application.I have a user model created with the artisan command "make::auth" which is located in App, and a Member model which is located inside the Modules folder.The issue is that after I login with the member guard and redirected to /member/profile Auth::guard('memberweb')->user() always returns null.But if I dd(Auth::guard('memberweb')->user()) in the login method of the MemberLoginController :/** * Member Login * * @re...Read more

Register a new type of user in laravel 5.5

I encounter an error in my register page of user in laravel 5.5 like below:****SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "tb_users_user_name_key"\nDETAIL: Key (user_name)=(user_deo) already exists. (SQL: insert into "tb_users" ("name", "user_name", "phone", "email", "password", "default_password", "updated_at", "created_at") values (doe, user_deo, 017244668,, $2y$10$96qs6iC6HVbBZ2rtfNcsg.DiBjA14g/k9DQPzFWqXSh153sZCuUPy, 123456, 2018-06-18 01:47:36, 2018-06-18 01:47:36) returnin...Read more

Laravel 5.5 - Notifications are not being queued?

I have the following notification class:use Illuminate\Bus\Queueable;use Illuminate\Notifications\Notification;use Illuminate\Contracts\Queue\ShouldQueue;use Illuminate\Notifications\Messages\MailMessage;class ConfirmEmailNotification extends Notification implements ShouldQueue{ use Queueable; public function __construct() { // } public function via($notifiable) { return ['mail']; } public function toMail($notifiable) { $user = $notifiable; $url = url('/register/confirm/'. $user->confirma...Read more

“The page has expired due to inactivity” appears when using a services methods - Laravel 5.5

According to other asked questions like this one, I did many doings to prevent this request expired message but there is no solution for my issue. In the long run I recognized that the message appears when I call a service method inside a controller which run on form action!Here is my codes samples with some descriptions:My route:Route::post('Material/{id}', 'MaterialController@updateMaterial')->name('updateMaterial');Material Controller Constructor:public function __construct(CustomService $srv){ $this->middleware('admin')->only(['...Read more

Laravel 5.5 Job Chaining: Call to undefined method ::chain()

I have two jobs, first one needs to dispatch second before run, I find out job chain but can't make it work, all jobs set up from box, so in theory it should just work.Here is my first job:namespace App\Jobs;class MCSendJob{ use Dispatchable, InteractsWithQueue; public function handle(Config $config, MCReport $report) { if ($config->mcdb_status) { $report->setConnection('mcdb'); } elseif ($config->rmcdb_status) { $report->setConnection('rmcdb'); } else { $this->fail(n...Read more

laravel 5.5 - local.ERROR: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'attempts' at row 1

Hi have you encounter similar problem in queue jobs?I got this error on testing environment online.[2019-06-28 01:55:20]local.ERROR: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'attempts' at row 1 (SQL: update `jobs` set `reserved_at` = 1561701319, `attempts` = 256 where `id` = 510) {"exception":"[object](Illuminate\\Database\\QueryException(code: 22003): SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'attempts' at row 1 (SQL: update `jobs` set `reserved_at` = 1561701319, `att...Read more

Validation call according Checkbox check in Laravel 5.5

I have one checkbox and two input fields I want if I check checkbox then second (b) input box is require otherwise first (a) input field in require.<input type="checkbox" name="try" id="try" value="on"><input type="text" name="a" id="a"><input type="text" name="b" id="b">$validator = Validator::make($request->all(), [ 'a' => 'nullable|required_if:try,off', 'b' => 'nullable|required_if:try,on']);Try but not success. Please Help. Edit [Typo in required_if]...Read more

laravel 5.5 - Not redirecting to payment page when payment created

I am trying to integrate laravel-mollie in my website using in the example that they are providing the example. When i'm creating new payment it should redirect me to payment page, But its not showing anything.. here is my code:public function preparePayment($data, $orderId){ $payment = Mollie::api()->payments()->create([ 'amount' => [ 'currency' => 'EUR', 'value' => '100.00', // You must send the correct number of decimals, thus we enforce the use of strings ], "description" => "M...Read more

laravel cashier braintree expiry date

I am using "laravel/cashier-braintree": "~2.0" package to manage subscriptions in my Laravel 5.5.40 application.So far i have created a plan to and created subscriptions to the plans via multiple users. I just cant find a way to get the plan expiry date for a user. Based on this laracast discussion, the ends_at column in subscriptions table stays null by default until a user cancels the subscription.I did try the Customer::find($braintree_id) method and got a huge customer detail object with a subscriptions object as below: "subscriptions": [ ...Read more