{"id":1309,"date":"2016-12-30T06:47:58","date_gmt":"2016-12-30T06:47:58","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=1309"},"modified":"2016-12-31T03:47:20","modified_gmt":"2016-12-31T03:47:20","slug":"fotista-auction","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2016\/12\/30\/fotista-auction\/","title":{"rendered":"Fotista Auction"},"content":{"rendered":"<p>Source: <a href=\"https:\/\/github.com\/fotistas\/fotista\">https:\/\/github.com\/fotistas\/fotista<\/a> (Laravel 4.2)<\/p>\n<p>Installation:<\/p>\n<ol>\n<li>Clone from https:\/\/github.com\/fotistas\/fotista\n<pre class=\"lang:default decode:true\">git clone https:\/\/github.com\/fotistas\/fotista.git<\/pre>\n<pre class=\"lang:default decode:true\">teddy@teddy-K43SJ:~\/Documents\/works\/laravel$ git clone https:\/\/github.com\/fotistas\/fotista.git\r\nCloning into 'fotista'...\r\nremote: Counting objects: 642, done.\r\nremote: Total 642 (delta 0), reused 0 (delta 0), pack-reused 642\r\nReceiving objects: 100% (642\/642), 5.23 MiB | 634.00 KiB\/s, done.\r\nResolving deltas: 100% (359\/359), done.\r\nChecking connectivity... done.<\/pre>\n<p>Then go to &#8216;fotista&#8217; directory<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Documents\/works\/laravel$ cd fotista\/<\/pre>\n<\/li>\n<li>Install required components:\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/fotista$ composer install<\/pre>\n<\/li>\n<li>Create a database &#8216;auction&#8217; via phpmyadmin<\/li>\n<li>Import the sql script &#8216;auction-20140823-0211.sql&#8217; in &#8216;\/sql archive\/&#8217; dir (extract the zip first).<\/li>\n<li>Set a few configuration settings in \/app\/config\/app.php like\n<pre class=\"lang:default decode:true \">'url' =&gt; 'http:\/\/localhost\/works\/laravel\/auction\/public',<\/pre>\n<p>and the database (Laravel 4 dont use .env file to store the database setting) in \/app\/config\/database.php<\/p>\n<pre class=\"lang:default decode:true \">'mysql' =&gt; array(\r\n    'driver'    =&gt; 'mysql',\r\n    'host'      =&gt; 'localhost',\r\n    'database'  =&gt; 'auction',\r\n    'username'  =&gt; 'root',\r\n    'password'  =&gt; 'XXX',\r\n    'charset'   =&gt; 'utf8',\r\n    'collation' =&gt; 'utf8_unicode_ci',\r\n    'prefix'    =&gt; '',\r\n),\r\n<\/pre>\n<p>&nbsp;<\/li>\n<li>generate the new key\n<pre class=\"lang:default decode:true \">php artisan key:generate<\/pre>\n<p>&nbsp;<\/li>\n<li>set file permission to 777 for \/app\/storage\n<pre class=\"lang:default decode:true  \">teddy@teddy-K43SJ:~\/Documents\/works\/laravel\/fotista$ sudo chmod -R 777 app\/storage\/<\/pre>\n<p>&nbsp;<\/li>\n<li>Make some update on the database, especially for table &#8216;images&#8217;, I need to remove and replace &#8216;http:\\\\\/\\\\\/localhost\\\\\/auction\\\\\/public\\\\\/uploads\\\\\/&#8217; in &#8216;images&#8217; field because I just need the image name. No need the url. With this I can show the product image and the thumbnails. I did the replace in my text editor geany instead of on phpmyadmin because it&#8217;s easier to do it in geany. Also modified a few files to display the images and the thumbnails properly:<br \/>\nin \/app\/views\/home.blade.php, replace\u00a0 &#8216;$product -&gt; thumbnail&#8217; to &#8216;{{ URL::to( &#8216;uploads\/&#8217; .\u00a0 $product -&gt; thumbnail) }}&#8217; (TWICE) like this<\/p>\n<pre class=\"lang:default decode:true \">&lt;img src=\"{{ URL::to( 'uploads\/' .  $product -&gt; thumbnail) }}\" \/&gt;<\/pre>\n<p>Also the same for \/app\/views\/store.blade.php and \/app\/views\/auction.blade.php. Same also for \/app\/views\/product.blade.php BUT at &#8216;$product -&gt; large&#8217; like this:<\/p>\n<pre class=\"lang:default decode:true \">&lt;img src=\"{{ URL::to( 'uploads\/' .  $product -&gt; large) }}\" \/&gt;<\/pre>\n<p>Also the same for &#8216;admin&#8217; page: \/app\/views\/admin\/products.blade.php, \/app\/views\/admin\/product.blade.php,\u00a0\/app\/views\/admin\/auction.blade.php.<\/li>\n<li>Open it\u00a0http:\/\/localhost\/works\/laravel\/fotista\/public\/<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-front.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1313\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-front-767x1024.jpg\" alt=\"fotista-front\" width=\"767\" height=\"1024\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-front-767x1024.jpg 767w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-front-225x300.jpg 225w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-front-768x1025.jpg 768w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-front.jpg 1013w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a>The admin page http:\/\/localhost\/works\/laravel\/fotista\/public\/admin\/<br \/>\nhttp:\/\/localhost\/works\/laravel\/fotista\/public\/admin\/products<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-admin-productlist.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1314\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-admin-productlist-1024x406.png\" alt=\"fotista-admin-productlist\" width=\"840\" height=\"333\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-admin-productlist-1024x406.png 1024w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-admin-productlist-300x119.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-admin-productlist-768x304.png 768w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-admin-productlist-1200x476.png 1200w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2016\/12\/fotista-admin-productlist.png 1345w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/li>\n<li>SOME ERRORS &amp; SOLUTION:<br \/>\nThe first time, I got this error:<\/p>\n<pre class=\"lang:default decode:true \">Error in exception handler.<\/pre>\n<p>SOLUTION: It because I forgot to set the file permission at #7 (ref:http:\/\/stackoverflow.com\/questions\/24982598\/laravel-error-in-exception-handler)<br \/>\nNOTE: To get better debug environment, I need to set &#8216;debug&#8217; to &#8216;true&#8217; in \/app\/config\/app.php!<\/p>\n<pre class=\"lang:default decode:true \">'debug' =&gt; true,<\/pre>\n<p>After that I got another error:<\/p>\n<pre class=\"lang:default decode:true \">Whoops, looks like something went wrong.<\/pre>\n<p>SOLUTION: That because I forgot to set a new key like at #6 (ref:http:\/\/laravel.io\/forum\/04-22-2014-whoops-looks-like-something-went-wrong-with-new-installation)<br \/>\nNOTE: For laravel 4, No need to create .env file like laravel 5<br \/>\nThen I got another error:<\/p>\n<pre class=\"lang:default decode:true \">Access denied for user ''@'localhost' (using password: NO)<\/pre>\n<p>SOLUTION: I forgot to set the database setting in \/app\/config\/database.php like at #5 (ref: http:\/\/laravel.io\/forum\/07-02-2014-sqlstatehy000-1044-access-denied-for-user-localhost-to-database-forge?page=1)<\/li>\n<\/ol>\n<p>UNSOLVED ERROR:<br \/>\nWhen I tried to click &#8216;Auction started click here to open it&#8217;. It didn&#8217;t work. It did open a new page but do nothing. Just printed &#8216;Loading&#8230;&#8217;. From the console, it&#8217;s looking for a file in http:\/\/localhost\/works\/laravel\/fotista\/public\/api\/auction BUT THERE IS NO \/public\/api\/auction DIR AVAILABLE!<br \/>\nThe controller responsible for this is \/app\/controller\/AuctionController.php, The view is \/app\/views\/auction-app.blade.php and the javascript file in \/public\/js\/auction-app.js<br \/>\nHOW TO MAKE THE AUCTION FULLY WORKS???? ESPECIALLY THE ANGULAR JS &#8216;auction-app.js&#8217;???<br \/>\nPLS TRY THIS GITHUB: <a href=\"https:\/\/github.com\/yervand951\/angular-auction\">https:\/\/github.com\/yervand951\/angular-auction<\/a><br \/>\nCONVERT TO LARAVEL 5 ???? ref: <a href=\"https:\/\/mattstauffer.co\/blog\/upgrading-from-laravel-4-to-laravel-5\">https:\/\/mattstauffer.co\/blog\/upgrading-from-laravel-4-to-laravel-5<\/a> and <a href=\"https:\/\/laravel.com\/docs\/5.0\/upgrade\">https:\/\/laravel.com\/docs\/5.0\/upgrade<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Source: https:\/\/github.com\/fotistas\/fotista (Laravel 4.2) Installation: Clone from https:\/\/github.com\/fotistas\/fotista git clone https:\/\/github.com\/fotistas\/fotista.git teddy@teddy-K43SJ:~\/Documents\/works\/laravel$ git clone https:\/\/github.com\/fotistas\/fotista.git Cloning into &#8216;fotista&#8217;&#8230; remote: Counting objects: 642, done. remote: Total 642 (delta 0), reused 0 (delta 0), pack-reused 642 Receiving objects: 100% (642\/642), 5.23 MiB | 634.00 KiB\/s, done. Resolving deltas: 100% (359\/359), done. Checking connectivity&#8230; done. Then go to &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2016\/12\/30\/fotista-auction\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Fotista Auction&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,13],"tags":[],"class_list":["post-1309","post","type-post","status-publish","format-standard","hentry","category-laravel","category-tutorial"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=1309"}],"version-history":[{"count":10,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1309\/revisions"}],"predecessor-version":[{"id":1329,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/1309\/revisions\/1329"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=1309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=1309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=1309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}