Answers for "store public laravel"

PHP
2

how set variable public in static method in laravel

class ContentController extends BaseController {

    public static $text = null;

    public static function getContent($description)
    {
        $content = Content::where('description', $description)->first();
        return static::$text = $content->text;
    }
}
Posted by: Guest on April-10-2021
0

public_path laravel

echo base_path() . "\n";
echo app_path() . "\n";
echo public_path() . "\n";
echo storage_path() . "\n";
Posted by: Guest on October-17-2021

Browse Popular Code Answers by Language