Log message #4161998

# At Username Text
# Jul 25th 2018, 12:58 mr.mjsm I am actually new to cakephp, and i learn more and more everyday, however, the way i am following is. just get the functionality right, i will deal with the design later. so I want to know how you guys do the design and if there is a custom layouts for cakephp
# Jul 25th 2018, 12:57 josbeir :partyparrot:
# Jul 25th 2018, 12:56 mark yep! you the man
# Jul 25th 2018, 12:55 josbeir have fun :slightly_smiling_face:
# Jul 25th 2018, 12:54 mark @josbeir seems to work now, have to test some post data a bit.
# Jul 25th 2018, 12:54 mark let me work on that @romanovich095
# Jul 25th 2018, 12:54 romanovich095 Nice try, @mr.mjsm xD
# Jul 25th 2018, 12:53 mr.mjsm :rolling_on_the_floor_laughing:
# Jul 25th 2018, 12:53 josbeir :O
# Jul 25th 2018, 12:53 josbeir sure, but since that was yesterday you would need to wait a year for a reply
# Jul 25th 2018, 12:50 mr.mjsm @josbeir would I get a 24/7 support, if i used your file plugin in my project ? ;P
# Jul 25th 2018, 12:50 turkles you have a : instead of a ; by looks of it
# Jul 25th 2018, 12:49 romanovich095 Because there is something wrong in the trait
# Jul 25th 2018, 12:47 romanovich095 @mark, could You, please, share the FilesystemAwareTrait?
# Jul 25th 2018, 12:40 admad @mark please use gist or pastebin to show code. don't post in channel
# Jul 25th 2018, 12:39 mark ha!, you're right. dropped phpinfo into webroot. seems i'm using in 5.6.
# Jul 25th 2018, 12:38 mark will double check that now
# Jul 25th 2018, 12:37 josbeir becasue it looks like type hinting is not working
# Jul 25th 2018, 12:37 josbeir are you sure you are using 7.1 inside your webserver
# Jul 25th 2018, 12:36 josbeir bit spammy :slightly_smiling_face:
# Jul 25th 2018, 12:35 josbeir best paste it as a snippet next time
# Jul 25th 2018, 12:34 mark I have PHP 7.1.19-1+ubuntu14.04.1+deb.sury.org+1
# Jul 25th 2018, 12:34 slackebot \App\Model\Entity\Dealer[]|\Cake\Datasource\ResultSetInterface paginate($object = null, array $settings = []) */ class DealersController extends AppController { /** * Index method * * @return \Cake\Http\Response|void */ use FilesystemAwareTrait; public function upload() { $fileEntity = $this->getFilesystem('myfs')->upload($this->request->getData('upload')); debug($fileEntity); }
# Jul 25th 2018, 12:34 mark cool. :) stuck on this one though, Error: syntax error, unexpected ':', expecting ';' or '{' File /home/cliper/rover/vendor/josbeir/cakephp-filesystem/src/FilesystemAwareTrait.php Line: 17 head of that code : <?php namespace App\Controller; use App\Controller\AppController; use Josbeir\Filesystem\FilesystemAwareTrait; /** * Dealers Controller * * @property \App\Model\Table\DealersTable $Dealers * * @method
# Jul 25th 2018, 12:28 josbeir yeah traits :slightly_smiling_face:
# Jul 25th 2018, 12:27 mark yep, right. let me try again now. actually, i just though of why there's two "use" statement .. and I never know we can do "use" inside a class?
# Jul 25th 2018, 12:22 josbeir if you push an upload to your controller and capture the file data, pass it to the filesystem upload method it should return the uploaded file entity
# Jul 25th 2018, 12:21 josbeir nothing wrong with the example
# Jul 25th 2018, 12:21 mark maybe we can provide a practical use of it though?
# Jul 25th 2018, 12:21 mark @josbeir yeah, wonder if we can do "use" next to that "AppController"
# Jul 25th 2018, 12:21 mark yep, will try this one out to admad. :)
# Jul 25th 2018, 12:10 josbeir yeah filesystem is a bit more abstract and requires more work to set up :slightly_smiling_face:
# Jul 25th 2018, 12:09 admad @mark if you are looking for something more plug n play check out https://github.com/friendsofcake/cakephp-upload
# Jul 25th 2018, 12:09 josbeir its just an example
# Jul 25th 2018, 12:08 mark noice, im lost at this part though: namespace App\Controller; use Josbeir\Filesystem\FilesystemAwareTrait; class MyController extends AppController { use FilesystemAwareTrait; public function upload()
# Jul 25th 2018, 12:05 josbeir added a little howto to use glide
# Jul 25th 2018, 12:05 josbeir @mark https://github.com/josbeir/cakephp-filesystem/blob/master/README.md#extras
# Jul 25th 2018, 11:56 mark RAD :) thanks much I'll look into this
# Jul 25th 2018, 11:54 josbeir for the server and cache just use $this->getFilesystem()->getDisk(); (one for source and one for cache)
# Jul 25th 2018, 11:54 josbeir https://github.com/ADmad/cakephp-glide that one
# Jul 25th 2018, 11:53 josbeir i ment, glide plugin :)