mardi 29 décembre 2015

bind laravel app authentican to another laravel app authentican

I have two laravel app and each has separate authentication (login), now what I want is when the user successfully login to my first laravel app (login laravel app) then the second laravel app (serve as the main app) will authenticate the current logged user (successfully login). It's some sort of a global authentication where I have single separate login laravel app to be used in login and once use has logged in to that laravel app then he can automatically logged to any other app that was bind to that login app. Any ideas, clues, suggestions, recommendations, help please?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1VnPVby
via IFTTT

Laravel 5.2 update/insert batch similar to Codeigniter's update_batch/insert_batch()

Does laravel have an update batch functionality similar to Codeigniter?

Codeigniter uses $this->db->update_batch('mytable', $data, 'title'); to do a batch update. More info could be found here.

But as for laravel's update, it seems that it could only do a single transaction. I feel that this is kind of bad when you have multiple rows to update wherein it will be inside a for loop. Something similar to this:

foreach ($rows => $row) {
    DB::table('users')->where('id', $row['row_id'])->update(['votes' => 1]);
}

For atleast you get the picture, right?

If you'll look into this code, your database could get knock out pretty much as it keeps on connecting unlike the update_batch(), only a single transaction is being throw.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1QV10SF
via IFTTT

Laravel Storage returns: mkdir(): File exists

When ill try to check if a file exists in Laravel 5.1 i am always getting this error:

ErrorException in Local.php line 95: 
mkdir(): File exists

I dont know what could here be wrong, i want to check if a file exists or not with:

$exists = Storage::disk('images')->has('filename.jpg');

dd($exists);

Disk "images":

'disks' => [

    'local' => [
        'driver' => 'local',
        'root'   => storage_path().'/app',
    ],

    'images' => [
        'driver' => 'local',
        'root'   => storage_path().'/app/images',
    ],

Any ideas?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1VnPVbs
via IFTTT

What's the difference between triple & double curly brackets in Laravel 5 Blade?

According to this:

Is this Blade sanitation working correctly (double vs triple curly braces)?

Double curly brackets is unfiltered and Triple curly brackets is escaped with the e() method.

But when I tried it I found that:

{{ '<script>console.log("hello")</script>' }}

outputs the same as:

{{{ '<script>console.log("hello")</script>' }}}

In other words, both were sanitised.

So what's the difference??? Is this something to do with an update to Laravel 5 vs Laravel 4?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1IBatvn
via IFTTT

Running Laravel queues automatically

I have implemented Laravel queue.The thing is i have to run the command php artisan queue:listen every time.Is there any way that the jobs get executed automatically without running any command.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1IBavDI
via IFTTT

how i can use paginate() after get() ?

i'm need to use paginate but i used get() before for some reasons so how i can use paginate() after get() ? when i try

$s   = Lists::where('id','>',500)->get();
             $s = $s->paginate(2);
            var_dump($s);

i get

Call to undefined method Illuminate\Database\Eloquent\Collection::paginate();

i do every thing go skip get() before but it's big problem any one have any idea

sample



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1YPCdhI
via IFTTT

Method not found error in laravel

I am stuck in this error in laravel.

BadMethodCallException in View.php line 380: Method [middleware] does not exist on view.

Any idea on this, that any core file has been disturbed ?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1RPtsp0
via IFTTT