Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,567 members, 7,958,754 topics. Date: Wednesday, 25 September 2024 at 10:37 PM |
Nairaland Forum / Jacob05's Profile / Jacob05's Posts
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 37 pages)
Programming / Re: Populating Select Menu From Model In User Registration Form In Laravel by jacob05(m): 11:19pm On Aug 29, 2015 |
maekhel: It's just a normal route.. But instead of returning a view you return a "TYPE"... The "TYPE" can be a string, XML, and most preferably JSON eg return Response::json(array('name' => 'Steve', 'state' => 'CA')); |
Programming / Re: Laravel:call To Undefined Method Illuminate\database\eloquent\collection::save() by jacob05(m): 10:56pm On Aug 29, 2015 |
In the Above, We're trying to find all Accounts in the database that has the value of 'male' as gender or that is owned by a male .... so this query is most likely to return more than one record from the database or none from the database. This would cause 'Eloquent' to return a Collection even if the number of records found is One/1.. Because the the returned value is a Collection, we would need to loop through the returned set to have access to the individual Model. In the above, the value returned to $account is a Collection. so trying to access a property or an Eloquent method on the result would cause an error... The above can be rewritten as We're now changing the name of all male account holders to "Ademola Plumptre"; If we only want to change the name of the first Account in the DB that is owned by a male then we chain our where with first method... Note ... the result of first can only be one record, so Eloquent returns an Eloquent model of the first Account which we can modify after fetched..
|
Programming / Re: Laravel:call To Undefined Method Illuminate\database\eloquent\collection::save() by jacob05(m): 10:20pm On Aug 29, 2015 |
In the Above, We're trying to find an Account in the database that has an id of 10 .... so this query is always going to return a single Object or none from the database. so an Eloquent Model object of Account would be returned from the database if there is an Account with an id of 10 in the database. With the returned Eloquent model, we can update the name field and call the save method directly. |
Programming / Re: Populating Select Menu From Model In User Registration Form In Laravel by jacob05(m): 10:12pm On Aug 29, 2015 |
maekhel: use Javascript .... You'd need an API call too.. to fetch the result based on the selected select option |
Programming / Re: Laravel:call To Undefined Method Illuminate\database\eloquent\collection::save() by jacob05(m): 10:09pm On Aug 29, 2015 |
All multi-result sets returned by Eloquent, either via the get method or a relationship, will return a collection object. Simple put... If the result of your query is likely to return more than one value, Laravel returns a collection. Understanding query methods that returns a Collection would save you the problem of calling an Eloquent model method on a Collection.. |
Programming / Re: Populating Select Menu From Model In User Registration Form In Laravel by jacob05(m): 9:41pm On Aug 29, 2015 |
maekhel:One thesame page |
Programming / Re: Q-basic Program To Compute Simple Interest. by jacob05(m): 8:27pm On Aug 29, 2015 |
Vstuffs:You're welcome |
Programming / Re: Q-basic Program To Compute Simple Interest. by jacob05(m): 8:11pm On Aug 29, 2015 |
Vstuffs:should be DIM Interest as Double |
Jobs/Vacancies / Re: Andela: IT Training And Job by jacob05(m): 3:03pm On Aug 29, 2015 |
tgmservice: sname00: Monthly |
Jobs/Vacancies / Re: Andela: IT Training And Job by jacob05(m): 11:25am On Aug 29, 2015 |
tgmservice:~81k for first 3 to 5 months... then increments based on performance.. |
Jobs/Vacancies / Re: Andela: IT Training And Job by jacob05(m): 9:56am On Aug 29, 2015 |
Sadly ... I may not be around for the bootcamp... .. #NYSC_wahala |
Jobs/Vacancies / Re: Andela: IT Training And Job by jacob05(m): 9:44am On Aug 29, 2015 |
1 Like |
Programming / Re: President Buhari Voice Recognition Program - Contest For 50,000 Naira by jacob05(m): 7:36am On Aug 29, 2015 |
Akosa007:It's still on.. |
Jobs/Vacancies / Re: Andela: IT Training And Job by jacob05(m): 5:51pm On Aug 28, 2015 |
1Dray:Yea.. but it was extended on Google calendar |
Jobs/Vacancies / Re: Andela: IT Training And Job by jacob05(m): 5:31pm On Aug 28, 2015 |
Ramos16: Cool dudes.. Got interviewed today too. |
Programming / Re: How To Add Icon To Visual Basic 6.0 Form by jacob05(m): 5:39pm On Aug 27, 2015 |
MuhammaduBuhari: |
Programming / Re: Create A Nested Lists Of Categories In Laravel 5 by jacob05(m): 5:39pm On Aug 27, 2015 |
MuhammaduBuhari:Yea.. Laravel Rocks !!! 1 Like |
Programming / Re: How To Add Icon To Visual Basic 6.0 Form by jacob05(m): 11:19am On Aug 27, 2015 |
MuhammaduBuhari: |
Programming / Re: How To Add Icon To Visual Basic 6.0 Form by jacob05(m): 11:15am On Aug 27, 2015 |
MuhammaduBuhari:hmmmmm... Upgrades ?? Fixes Feature requests .... #JUSTSAYiNG |
Programming / Re: How To Add Icon To Visual Basic 6.0 Form by jacob05(m): 11:14am On Aug 27, 2015 |
#JUSTSAYING |
Programming / Re: How To Add Icon To Visual Basic 6.0 Form by jacob05(m): 11:14am On Aug 27, 2015 |
MuhammaduBuhari: hmmm... the combo can be better sha.. #justSaying... But resultant effect of solving the problem using the wrong tools is greater than the gain.. what if after a month an upgrade is requested and it'd break your "juxtaposed" tools ?? |
Programming / Re: How To Add Icon To Visual Basic 6.0 Form by jacob05(m): 10:16am On Aug 27, 2015 |
MuhammaduBuhari:C++, now you're talking.. lolz |
Programming / Re: How To Add Icon To Visual Basic 6.0 Form by jacob05(m): 9:34am On Aug 27, 2015 |
MuhammaduBuhari: |
Programming / Re: Create A Nested Lists Of Categories In Laravel 5 by jacob05(m): 9:30am On Aug 27, 2015 |
maekhel:Good |
Programming / Re: Phploy A Must Have by jacob05(m): 11:14pm On Aug 26, 2015 |
Cooool. |
Programming / Re: Create A Nested Lists Of Categories In Laravel 5 by jacob05(m): 11:04pm On Aug 26, 2015 |
maekhel: Let's see how you implemented the Models and the Views |
Programming / Re: Create A Nested Lists Of Categories In Laravel 5 by jacob05(m): 10:45pm On Aug 26, 2015 |
maekhel:It's most likely that $categories = Category::find($id); found nothing but passed as null and the view is trying to access it's property |
Programming / Re: Create A Nested Lists Of Categories In Laravel 5 by jacob05(m): 10:13pm On Aug 26, 2015 |
chiwex: and those can't be done implementing "vanilla" Eloquent .... |
Programming / Re: Create A Nested Lists Of Categories In Laravel 5 by jacob05(m): 9:45pm On Aug 26, 2015 |
chiwex: An Over-Kill, to me, for the simple task... Baum\Node? , phewww |
Programming / Re: Programming Jargons Other Programmers Don't Know by jacob05(m): 8:57pm On Aug 26, 2015 |
MuhammaduBuhari: |
Programming / Re: Create A Nested Lists Of Categories In Laravel 5 by jacob05(m): 2:14pm On Aug 26, 2015 |
MuhammaduBuhari: lol... Ok |
Programming / Re: Create A Nested Lists Of Categories In Laravel 5 by jacob05(m): 12:55pm On Aug 26, 2015 |
MuhammaduBuhari:Egbon, that one na sql wahala.... He's looking for the Laravel 5 approach |
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 37 pages)
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 33 |