Currently I am learning Laravel by doing some basic tasks.
I am wanting to print data from a controller to the view for a profile page.
Current code I have for my Controller:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
class AccountController extends Controller
{
$userInfo = array(
'accountType' => 'Developer',
'username' => 'Sys',
'email' => '123@example.com',
'firstName' => 'Greatest',
'lastName' => 'Forever',
'gender' => 'M'
);
$posts = array(
'fromUser' => 'Bob',
'msg' => 'Hello World!',
'sentTime' => '2016-07-07 18:01:00'
);
$friends = array(
'Bob', 'Jim', 'Speed'
);
}
My view currently has nothing in as things I have tried haven't worked.