bstrahija / l4-site-tutorial Goto Github PK
View Code? Open in Web Editor NEWSimple website with a backend built in Laravel 4
Home Page: http://creolab.hr
Simple website with a backend built in Laravel 4
Home Page: http://creolab.hr
Hi,
I am working through your tutorial and it seems like there is an issue with generating the proper resource URL for show etc.
Specifically In File: /app/views/admin/pages/index.blade.php
{{ URL::route('admin.pages.show', $page->id) }}
I get the error: "array_shift() expects parameter 1 to be array, integer given" when trying to generate that URL. Do you know why that is?
Thank you
After a fresh install it doesn't work using 0.4.0. Neither dev-master
in migrations that doesn't has create_users_table migrate
how can i install l4?that miss users table
Hi,
In Laravel4 tutorial part 2:
1.seek tittle Custom commands
2.going backwards the second code view must be of the method destroy and is showing update method of PageControlller.php.
Must show:
public function destroy($id)
{
$page = Page::find($id);
//$page->delete();
Notification::success('The page was deleted.');
return Redirect::route('admin.pages.index');
}
Regards!
Hello,
I wan to add 5 images for an article/product. Each image will be re-sized to large medium and thumbnail. Water mark need to be placed on large image only.
Then editing and deletion...of images...
How this can easily be done in l4 site tutorial...
Thanks for help...
Hello,
Near Layouts and views you post the code for the file default_balde.php with this includes:
@include('admin._partials.assets')
@include('admin._partials.navigation')
As I'm doing the tutorial,in this moment these files hasn't been explained yet and the app fails with a file not found error.
This lines must be remove from that code view :)
Regards!
a. I am curious what is the reason for having the public/site folder as the controllers should most likely stay in /app
folder right?
b. Also, as public
would be exposed to the internet, so any files added to the site controller would be by default accessible directly causing security issues, isn't it?
Hi,
Just started following your tutorial over here:
I'm as far as creating the ContentSeeder.php class and running 'php artisan db:seed'.
However I get the following issue in the console:
Sentry tables seeded!
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'App\\Models\\Article' not found","file":"\/Users\/seandelaney\/Sites\/laravel-development.local\/app\/database\/seeds\/ContentSeeder.php","line":17}}
I've used the same contents as your ContentSeeder.php file:
use App\Models\Article; use App\Models\Page; class ContentSeeder extends Seeder { public function run() { DB::table('articles')->delete(); DB::table('pages')->delete(); Article::create(array( 'title' => 'First post', 'slug' => 'first-post', 'body' => 'Lorem ipsum dolor sit amet...', 'user_id' => 1, )); Page::create(array( 'title' => 'About us', 'slug' => 'about-us', 'body' => 'Lorem ipsum dolor sit amet...', 'user_id' => 1, )); } }
Any ideas ?
When I try to delete a page it gives the "The page was deleted." notification but the page remains stored in the database.
LE:
the method was commented. did a pull request.
Hi,
Is there a chance that you might add some common features like:
image uploading
Filtering datatables using json
Thanks
In there you command us to create:
app/views/admin/_layouts/defaut.blade.php
When it must be:
app/views/admin/_layouts/default.blade.php
I'll keep send you comments if I find something else!
Thanks for your great tutorial.
I'm following along in your (so far 3 part) tutorial. Although $entry->author->email in the article and articles view is giving me an error of "Trying to get property of non-object".
Have I gone wrong somewhere?
Thanks for the tutorial by the way. VERY helpful.
I tried to paginate, but the buttons with links (prev, 2,3,4,next) doesn't show up
In public/site/routes.php:
Route::get('blog', array('as' => 'article.list', function()
{
return View::make('site::articles')->with('entries', Article::orderBy('created_at' , 'DESC')/*)->get() */->paginate(2));
}));
If I type
/public/blog?page=1,2,3 etc
it diplays the two articles of the page correctly, but without the buttons.
Hi,
Your tutorial is amazing to learn how laravel works. I also like your way of organizing code.
You mentioned something about repetitive code and you'll expand it in a later tutorial.
But out of curiosity, how will you be fixing the duplicate code?
Will you be using generic resource classes that maybe expands some class?
How about the views?
There is "butfon" instead of "button"
in the closing tag of the button in:
https://github.com/bstrahija/l4-site-tutorial/blob/master/app/views/admin/pages/index.blade.php
Hi,
Well the erorr is self explaining, but I don't know where this is going wrong!
The SiteServiceProvider is found in the public/site/ map.
'providers' => array(
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider',
'Illuminate\Cache\CacheServiceProvider',
'Illuminate\Session\CommandsServiceProvider',
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
'Illuminate\Routing\ControllerServiceProvider',
'Illuminate\Cookie\CookieServiceProvider',
'Illuminate\Database\DatabaseServiceProvider',
'Illuminate\Encryption\EncryptionServiceProvider',
'Illuminate\Filesystem\FilesystemServiceProvider',
'Illuminate\Hashing\HashServiceProvider',
'Illuminate\Html\HtmlServiceProvider',
'Illuminate\Log\LogServiceProvider',
'Illuminate\Mail\MailServiceProvider',
'Illuminate\Database\MigrationServiceProvider',
'Illuminate\Pagination\PaginationServiceProvider',
'Illuminate\Queue\QueueServiceProvider',
'Illuminate\Redis\RedisServiceProvider',
'Illuminate\Remote\RemoteServiceProvider',
'Illuminate\Auth\Reminders\ReminderServiceProvider',
'Illuminate\Database\SeedServiceProvider',
'Illuminate\Session\SessionServiceProvider',
'Illuminate\Translation\TranslationServiceProvider',
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
'Illuminate\Workbench\WorkbenchServiceProvider',
'Cartalyst\Sentry\SentryServiceProvider',
'Krucas\Notification\NotificationServiceProvider',
'App\Site\SiteServiceProvider'
),
$ php artisan db:seed PHP Fatal error: Class 'Sentry' not found in /Users/aswartz/githosting/tools/app/database/seeds/SentrySeeder.php on line 14 {"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Sentry' not found","file":"\/Users\/aswartz\/githosting\/tools\/app\/database\/seeds\/SentrySeeder.php","line":14}}
If i add use Cartalyst\Sentry\Sentry;
i get:
$ php artisan db:seed {"error":{"type":"ErrorException","message":"Non-static method Cartalyst\\Sentry\\Sentry::getUserProvider() should not be called statically, assuming $this from incompatible context","file":"\/Users\/aswartz\/githosting\/tools\/app\/database\/seeds\/SentrySeeder.php","line":14}}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.