PHP code example of tranthihoaitrang / myclass
1. Go to this page and download the library: Download tranthihoaitrang/myclass library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tranthihoaitrang / myclass example snippets
namespace Foostart\Filemanager\Handlers;
class ConfigHandler
{
public function userField()
{
//original
//return auth()->user()->id;
$auth = \App::make('authenticator');
$user = $auth->getLoggedUser();
if (empty($user)) {
return NULL;
}
return $user->id;
}
}
## Step 7: Set up router
[
'name' => 'class-admin.menus.top-menu',
"route" => "Myclass",
"link" => '/admin/Myclass',
"permissions" => [$admin]
],