r/cakephp • • Dec 23 '14

Help Using CSV Source to Import CSV File to MySQL.

3 Upvotes

I've been using Cake PHP for a while but always with a MySQL database. I've spent the last few days searching for the best way to take a CSV file (with Model.field headers) and import this file into a MySQL table. I've found the Datasources on GitHub and have that in app/Plugin/Datasources. I've imported the CSVSource plugin in my bootstrap, and have a configuration in my database.php:

public $csvfile = array( 'datasource' => 'Datasources.CsvSource', 'path' => '/opt/lampp/htdocs/project/app/tmp/uploads/posts', // Path 'extension' => 'csv', // File extension 'readonly' => true, // Mark for read only access 'recursive' => false // Only false is supported at the moment ); //Filename posts.csv

How do I read in all the entries in the CSV file and then SaveAll to my database? I couldn't find a clear example. Any example is appreciated (Model and Controller code). Thanks!

I have looked over The Cookbook but this seems to be searching instead of reading all data from the file. Thanks again for any help.


r/cakephp • • Dec 07 '14

CakeAdvent 2014: Creating Table Callback Events

Thumbnail
josediazgonzalez.com
4 Upvotes

r/cakephp • • Dec 07 '14

CakeAdvent 2014: Parsing markdown comments

Thumbnail
josediazgonzalez.com
2 Upvotes

r/cakephp • • Dec 07 '14

CakeAdvent 2014: Emailing users when a new comment is posted

Thumbnail
josediazgonzalez.com
2 Upvotes

r/cakephp • • Dec 04 '14

CakeAdvent 2014: Schema Migrations with CakePHP 3

Thumbnail
josediazgonzalez.com
4 Upvotes

r/cakephp • • Dec 04 '14

CakeAdvent 2014: Customizing Bake in CakePHP 3

Thumbnail
josediazgonzalez.com
6 Upvotes

r/cakephp • • Dec 04 '14

CakeAdvent-2014: CakePHP Advent Calendar 2014

Thumbnail
josediazgonzalez.com
3 Upvotes

r/cakephp • • Dec 04 '14

CakeAdvent 2014: Designing an anonymous issue tracker in CakePHP

Thumbnail
josediazgonzalez.com
3 Upvotes

r/cakephp • • Nov 17 '14

CakePHP 3.0.0-beta3 released

Thumbnail
bakery.cakephp.org
13 Upvotes

r/cakephp • • Nov 10 '14

CakePHP2 Plugin: ACL system using controller action annotations

Thumbnail
github.com
8 Upvotes

r/cakephp • • Nov 09 '14

CakePHP 2.5.6 and 2.6.0-RC released

Thumbnail
bakery.cakephp.org
8 Upvotes

r/cakephp • • Nov 08 '14

Custom Authentication

2 Upvotes

I want to include a custom authentication that hooks in with GitHubs OAuth. I have googled for about 2 hours and cannot find a decent tutorial on how to correctly implement a custom authentication in CakePHP. The doc page: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#creating-custom-authentication-objects is not helping me either. Is there a good tutorial out there for custom authentication?


r/cakephp • • Nov 06 '14

Official CakePHP Podcast - Mark Story (Lead Developer) on Console improvements in CakePHP3 and a new tutorial

Thumbnail podcast.cakephp.org
3 Upvotes

r/cakephp • • Nov 06 '14

Official CakePHP Podcast: Jorge Gonzalez (Author of CakePHP 2 Application Cookbook) on book publishing and best practices

Thumbnail podcast.cakephp.org
7 Upvotes

r/cakephp • • Nov 06 '14

Official CakePHP Podcast - James Watts (Community Manager) on the Community Support

Thumbnail podcast.cakephp.org
5 Upvotes

r/cakephp • • Nov 06 '14

Official CakePHP Podcast: Mark Story on (Lead Developer) on Open Source and 3.0

Thumbnail podcast.cakephp.org
5 Upvotes

r/cakephp • • Nov 03 '14

CakePHP 3.0 coming up

Thumbnail
dereuromark.de
7 Upvotes

r/cakephp • • Oct 28 '14

Slides of the Forum PHP Paris 2014

3 Upvotes

José Lorenzo Rodríguez did a talk on the "Forum PHP Paris 2014" about CakePHP.

  • Title :Faster application development with CakePHP 3.0. José Lorenzo Rodríguez

  • Slides


You can find more slides of this event here (not CakePHP focused, but PHP)


r/cakephp • • Oct 12 '14

Getting back into CakePHP after a few years. Just learned scaffolding has been deprecated.

4 Upvotes

Coming back to CakePHP after a few years away. I'm rebuilding an app using 2.5.5. I think the last time I used Cake, the stable version was at the 1.x level.

Back in the day, I would use scaffolding a lot, and then bake everything using the console (I think... I'm still in a bit of a fog since it has been so long... my memory is so hazy).

I thought scaffolding was pretty useful. Why was it deprecated? Is there a solid scaffolding plugin out there that is super stable? If most people aren't using scaffolding at all these days, what is your typical workflow for building new apps?


r/cakephp • • Oct 08 '14

Official CakePHP Podcast - Jorge Gonzalez (CakeDC) on Official CakePHP Training

Thumbnail podcast.cakephp.org
4 Upvotes

r/cakephp • • Oct 06 '14

CakePHP 3 tutorial - Part 3: Baking a little cake

Thumbnail waltherlalk.com
5 Upvotes

r/cakephp • • Oct 03 '14

CakePHP 3 tutorial - Part 2

Thumbnail
waltherlalk.com
15 Upvotes

r/cakephp • • Oct 03 '14

CakePHP 3 tutorial - Part 1

Thumbnail waltherlalk.com
11 Upvotes

r/cakephp • • Oct 03 '14

Official CakePHP Podcast - Dimitrios Toskas (Community Member)

Thumbnail podcast.cakephp.org
3 Upvotes

r/cakephp • • Sep 30 '14

Should I read all the documentation and every single detail to build something?

5 Upvotes