Support the ongoing development of Laravel.io →
Configuration Database
Last updated 2 years ago.
0

Everything you need to know will be here :)

https://laracasts.com/series/laravel-5-fundamentals

0

kindly take a look at this one http://laravel.com/docs/5.0/queries#selects and http://laravel.com/docs/5.0/eloquent#basic-usage

$accounts = DB::table('users')->where('username', $username)->get();

please take note that whatever you do on query builder, you can do on Eloquent.

Last updated 9 years ago.
0

beanmoss said:

kindly take a look at this one http://laravel.com/docs/5.0/queries#selects and http://laravel.com/docs/5.0/eloquent#basic-usage

$accounts = DB::table('users')->where('username', $username)->get();

please take note that whatever you do on query builder, you can do on Eloquent.

I've seen similar ones to that, and to display it am I able to after that query do return $accounts and use {{ $accounts }} in my view?

0

you can use this on your route or Controller to pass data to your views:

return view('accounts.index', ['accounts' => $accounts]);

http://laravel.com/docs/5.0/views

Last updated 9 years ago.
0

beanmoss said:

you can use this on your route or Controller to pass data to your views:

return view('accounts.index', ['accounts' => $accounts]);

http://laravel.com/docs/5.0/views

I use

return view('accounts.index', compact('accounts'));
Last updated 9 years ago.
0

Download the code from this post and look it over. ====
http://laravel.io/forum/05-02-2015-laravel-5-fundamental-source-code

0

@Exhibitioner, you can do that too.

0

jimgwhit said:

Download the code from this post and look it over. ====
http://laravel.io/forum/05-02-2015-laravel-5-fundamental-source-code

Does that source make use of MySQL queries so that I am able to compare the Laravel methods and find out how they work?

Last updated 9 years ago.
0

I believe so, but if you query things exactly the way the Laravel 5 docs show, these will be correct for mysql. Look at eloquent and the query builder section of the docs and practice some simple queries at first.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.