Q:

Fetching and printing a single value from database using laravel

I'm currently trying to create my settings page by creating a table settings with company_name column.  My idea is to fetch the single value company_name and print it in the title of the pages and where the name is going to be appearing.  I just am not sure how to convert the array return from the DB::select to be able to print it correctly. 
The code:
public function __construct()
{ 
    $company_name = DB::table('settings')->select('company_name')->get();

    return View::share('company_name', $company_name);
}

And print it in the blade system as {{ $company_name }}, although it can't convert an array to string. 

A:

Either use eloquent (that I would recommend) which would be like this :
$company_name = Setting::first()->company_name;

or using fluent :
$company_name = DB::table('settings')->company_name;

