Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel facade

<?php
 
namespace AppHttpControllers;
 
use AppHttpControllersController;
use IlluminateSupportFacadesCache;
 
class UserController extends Controller
{
    /**
     * Show the profile for the given user.
     *
     * @param  int  $id
     * @return Response
     */
    public function showProfile($id)
    {
        $user = Cache::get('user:'.$id);
 
        return view('profile', ['user' => $user]);
    }
}
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #facade
ADD COMMENT
Topic
Name
2+7 =