Social Network with PHP: Home controller and base template (5/37)

preview_player
Показать описание

Official site

Twitter
Рекомендации по теме
Комментарии
Автор

Here's the navigation file if any 1 wants it:

discoboy
Автор

For homepage you can route just like this:

Route::get('/', [
]);

Creating HomeController just type: 'php artisan make:controller HomeController' in your app directory.

FGX
Автор

This is so good so far! Muchly appreciated.

jonnyhako
Автор

For all having problem with Class not found, you can use route group like i'm using
ex:
=> 'Web'), function() {
});
In this case i have backend and Frontend for my application

jacintoJoao
Автор

you don't need the full namespace in the routes

kennyPAGC
Автор

bad code, you're not showing full the code

jibrilqarni
Автор

i figured out why the session wasn’t firing. on Laravel 5.2 all routes must include midleware. the route must be like bellow.

Route::group(['middleware' => ['web']], function () {
Route::get('/', [
'as' => 'home',
]);
Route::get('/alert', function(){
return redirect()->route('home')->with('info', 'youre welcome');
});
});

jacintoJoao
Автор

The only file I'm able to download is sign-in.htm which, I'm guessing, is used later in the series.

tijsdevries
Автор

I tried to add the bootstrapp navigation toggle but it didnt collapse - apparently it requires JQuery yet when you add JQuery the homepage dissappears

screwtapeish
Автор

Help +Codecourse plz I keep getting: ReflectionException in Route.php line 280:Class does not exist

gerold
Автор

why dont you use controller generator @codecourse +codecourse

ahmadaziz
Автор

I follow every step of the code but I still get this error

Class not found

Has it to do with my routes.php or HomeController? Have been trying to solve this problem for days and Im sure it's no syntax mistake since I've checked every single character of this code Please I really do need som help for this :)

My code


routes.php

Route::get('/', [
'as' => 'home'
]);

- controller.php

namespace Chatty\Http\Controllers;

class HomeController extends Controller
{
public function index()
{
return view('home');
}
}

scottlinghoff
Автор

when you say " Perfect " i laugh =)) love like that GJ and thax u so much :3

dieucay
Автор

im getting this error

ReflectionException in Route.php line 282:
Function () does not exist

holeintheforest
Автор

Anyone else have major problems with the navigation showing partial information depending on the signin?? My site is completely broken and I don't know why :(

michellea
Автор

It all goes well until I add, , then it tells me there is an error in a file I can't even open. FatalErrorException in line 8: syntax error, unexpected ':'

davidburton
Автор

Hi Guys! i need some help! my session is not displaying, i can redirect the page, but i cant see alert page any help!
please

jacintoJoao
Автор

anyone give me a hand with this - getting an error:

FatalErrorException in HomeController.php line 6:
Class not found

code is exactly as he has done in the video
- not sure why its not picking up HomeController, and instead looking at Controller

MichaelLast
Автор

why not use php artisan for creating controller?

NagatoKamiPain
Автор

Hey! Will you updating this for laravel 5.5?

DJParulan