MethodNotAllowedHttpException

I'm trying to update the fields in the database, but I couldn't here is my routes : Route::get('orders', [ 'uses' => 'OrderController@postOrder', 'as' => 'order.show' ]); here the controller: public function postOrder() ...
more »

2017-03-21 22:03 (3) Answers

Login log laravel 5

I wanted to create user logs but something does not work for me. protected $listen = [ 'Illuminate\Auth\Events\Login' => [ 'App\Listeners\LogSuccessfulLogin', ], LogSuccessfulLogin.php class LogSuccessfulLogin { /** * ...
more »

2017-03-21 22:03 (1) Answers

Laravel query builder, having issue

i have an issue, and don't know how fix it. I need to get an specific object from select such as { "iso":"UA", "stories":122, "title":Ukraine } so i have an sql query SELECT c.iso, locale.title as title, (SELECT COUNT(DISTINCT s.id) FROM stories A...
more »

2017-03-21 20:03 (1) Answers

OctoberCMS Ajax Sort in the frontend

I am looking for the best practice on sorting a list in the frontend using ajax. So I have a component which loops through all the items. Then a sidebar with checkboxes to filter using Ajax. Each checkbox will be a category and will live filter by...
more »

2017-03-21 18:03 (0) Answers

Larave 5.4 required if validation issue

I have 2 fields, accepts_usd and price_usd. For price usd i have a validation rule: 'price_usd'=>'integer|required_if:accepts_usd,1', And for accepts_usd: 'accepts_usd'=>'boolean|required', When I want to store data if I set accepts_usd ...
more »

2017-03-21 16:03 (3) Answers

Pusher does not work on DigitalOcean.com

I want to integrate Pusher into Laravel 5.4. I installed "pusher/pusher-php-server: 2.6" via Composer and this is the code I use to send message: $options = ['cluster' => 'eu', 'encrypted' => true]; $pusher = new Pusher(env('PUSHER_KEY'), env(...
more »

2017-03-21 14:03 (1) Answers

Post request missing payload

I'm building an api that receives incoming webhooks from external parties. Post requests to my application lack a body in some cases. In my logs I see the incoming request with the following header: Accept: */* Content-Length: Content-Type:...
more »

2017-03-21 12:03 (1) Answers

Starting the Laravel cron job on a Mac

I have a command scheduled in the Laravel 5.4 scheduler and would like to start the Laravel cron on Mac OS X El Capitan. app/Console/Kernel.php <?php namespace App\Console; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\C...
more »

2017-03-21 11:03 (1) Answers

Calling a view through id in laravel

I have different files in views folder in navbar folder I have navbar-1 navbar-2 Now I am calling it dynamically by giving it an id like @include('index_store.navbar.navbar-{{ $layout->navbar_id }}') Where as $layout->navbar_id = 1 B...
more »

2017-03-21 10:03 (2) Answers

Syntax error in server not on localhost

I have this link: <a href="{{url('/list')}}">List of all members</a> and this route: Route::get('/list', 'NyfnController@list'); controller method: public function list() { $users=User::orderBy('district_involved')-&...
more »

2017-03-21 09:03 (2) Answers

Count duplicate columns in Laravel

How do you count the DUPLICATE columns in a database table using eloquent model querying? For example, in SQL, there's this command: SELECT name, COUNT(email) FROM users GROUP BY email HAVING ( COUNT(email) > 1 ) The code above will return t...
more »

2017-03-21 07:03 (2) Answers

How do I link two input fields of type date?

I have two input fields: <input name="check_in" type="date" class="checkin"> and <input name="check_out" type="date" class="checkout" I want to link them so when i pick a date from check_in field i can only pick the current day or a later da...
more »

2017-03-21 00:03 (1) Answers

Laravel dependency injection not working

I'm using resource controllers in my laravel app and I'm trying to use dependancy injection but it's not working on a particular model and controller. This works: /** * Display the specified resource. * * @param \App\Booking $booking * @return ...
more »

2017-03-20 17:03 (2) Answers

How to send a file via Axios to Laravel

I need to post a File from client to server via Axios. Here is my Vuejs code : methods: { 'successUpload': function (file) { const config = { headers: { 'Content-Type': 'multipart/form-data' } }; axios.post('/Upload/File',file, ...
more »

2017-03-20 16:03 (1) Answers

Condition in controller select the next id

I try to select an ID in my controller and add +1 to select the next one but it's return my a null object . someone have an idea how to select +1 id ? thanks a lot in advance here my controller //condition if checkbox is selected ! if($l...
more »

2017-03-20 12:03 (1) Answers