using POST instead of PUT in laravel

I'm using Laravel to build and api based admin control application and I'm using Route:resource instead of regular GET and POST methods. Just realized my hosting provider DOESN'T ALLOW PUT and DELETE now I need to so now I have to use POST and GET me

Laravel 5 AJAX post does not work

I am new in Laravel. I try to create a ajax post function on my project. But my following code don't work. When I click the button it does not response anything but I create the function as mention on the tutorial site. I search on google but don't g

Get relationships after insertion

In my code, I insert a new row into the database: $post = new Post; $post->user_id = Auth::user()->id; // more inserts $post->save(); In my Post.php, I have: protected $with = [ 'user', 'answers', 'questions' ]; public function users() { return $

do items show in Laravel columns

im new to laravel im currently trying to show my articles in columns of two however they are showing in individual rows stacked on top of each other. any help would be great as this is frustrating ! lol @extends('layouts.application') @section('page_

Laravel 5 entry :: get an error

Why am I having this error? I tried to add use Illuminate\Http\Request; but same error? Also is $username = $request->input('username'); the same as $username = Input::get('username');? The error I get is: FatalErrorException in LoginController.php l

Filtering GET results in laravel

Hello supposing i have a users table with the following columns; first_name, last_name, email, role, created_at. Now my admin wants to search for all users with a specific first_name. Obviously the code would be lyk this: $users = User::select('id',

Stuck in date format in seconds

first of all, I'm sorry for my english. I'm from germany. Now my Problem: I have a multiple array with some dates in it. I had to filter the first and the last date for every IP because I need the difference of both dates to know how much time the Us

Laravel puts and gets from the session does not work

in simple controller i want to put and get simple variables to session. in this my code after return to view and callback to other function my session is empty and return null public function doAction() { $this->order_id = Session::get('order_id'); $

Location date in Laravel view 5

I'm dealing with date localization in Laravel. Here is how i display date in blade.php. Publish on {{ $post->published_at->format('F j, Y') }} //Publish on November 20, 2015 I tried with (https://github.com/jenssegers/date) to use Jenssegers\Date\Da

Laravel 5 - RateLimit by IP address

I am now building REST API using Laravel 5. Now, I am going to limit the number of request in a given time period from the same IP Address. I want to implement it in middleware. Of course, there are many samples, but they are one for Laravel 4. They

how to access the admin controller in Laravel 5?

I want to access admin controller from admin folder ,but I'm having some trouble getting this to work. routes.php Route::group(array('namespace' => 'admin', 'prefix' => 'admin'), function() { Route::resource('ideas', 'AdminIdeaController'); }); Admi

Sort an object with php (laravel)

I have an object which contains photo file paths,there caption and the order they apear in etc. I need to sort the individual photos in order of the 'order', So that when i loop through each of the photos, they appear in the order specified by the or

Laravel eloquent, how to order sorted by custom

I have the following code that works fine: $products = Product::like($search)->whereIn('id', $request->input('product_ids'))->skip($offset)->take($limit)->get(array('products.*'))->sortBy(function($product) use ($sort_order) { $number =

Distinct to Laravel ORM?

I have the following table setup (just to explain my problem here): qid | value | created_at 1 1 2014-01-01 00:10 1 2 2014-01-01 00:12 2 231 2014-01-01 00:10 3 hello 2014-01-01 00:10 I would like to get an array with Distinct qids, order by created_a

Laravel 5 validation error

I have the following view: @extends('layouts.admin') @section('pagetitle') Edit Settings @stop @section('content') {!! $message or '' !!} @if (count($errors) > 0) <div class="alert alert-danger"> <strong>Whoops!</strong> The

how to use token refresh in tymondesigns / jwt-auth?

case in Laravel5. When I get tips it says "token expire", how can I refresh and get new token? I have been use JWTAuth::refresh($oldToken) but it doesn't work. What is the best way?When was the last time you updated/installed the package? Versio

Laravel 5 Road Strange Behavior

I have a Laravel site set up on a Homestead box, so I'm accessing it on sitename.app:8000. I have a route called "news" but when I try to go to sitename.app:8000/news I get oddly bounced out to sitename.app/news/. If I change the routename to &q

Laravel 5 Installation in Ubuntu: laravel command not found

This question already has an answer here: Laravel installation: How to place the ~/.composer/vendor/bin directory in your PATH? 15 answers When I try to install laravel 5 in ubuntu, I am getting error like this, laravel: command not found I followed