i will call a Controller all times. It is my GlobalController. I will use the Auth, and DB Function.
I doing this:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
use DB;
class GlobalController extends Controller
{
function user_in_party() {
// Get the logged user
$user = Auth::user();
print_R($user);
exit;
}
}
Now i call this from my Web.php (Routes) like this but i don't become the Authed user back why?
app('App\Http\Controllers\GlobalController')->user_in_party();
Can u help me? Or say me a better Solution?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire