bestmomo / laravel5-example Goto Github PK
View Code? Open in Web Editor NEWSimple laravel5 example for tutorial
License: MIT License
Simple laravel5 example for tutorial
License: MIT License
Can not login
$this->auth->login($user, $request->has('memory'));
To use filemanager is to click button Brows Server?
After I click on the button, there is a window show up with url http://localhost:8000/filemanager/index.html?CKEditor=content&CKEditorFuncNum=93&langCode=en with Error 404 Page does not exist.
Is what I do wrong? or I need to do additional configurations?
Redactor accounts can't either edit post or publish. I do like to give Redactors to those permission. How to fix the role permission?
Please teach me Sir.
Hi,
I'm trying your example on Platform.sh, and I got the following error when logging in:
TokenMismatchException in VerifyCsrfToken.php line 53
You can check my site here or my fork loading the proper Platform.sh database configuration.
Thanks,
GuGuss
i sure my user/password and host is conrrect.
but database connect error is showed
I have this suggestion: as your project is a kind of tutorial, it should contain more ready-to-use solutions. Each solution might be described in a separate blog entry - including instructions to remove it completely from the project.
By following Stack Overflow questions I concluded that many beginners have really basic problems as they have not seen a particular solution IN ACTION, that is used to meet a real-life necessity.
Also advanced users don't have time to follow ALL current docs and employ new functions.
This is why I'd recommend to add ready-to-use solutions as task-oriented. For instance: "how to add social login". When I was total noob just 6 months ago, the task was totally beyond me. Now the 5.0 docs are much cleared and describe a practically native solution.
But still there is a lot of space to make things much easier for beginners.
That is why I strongly recommend to put comments in the app files (controllers, models), to guide some not really oriented through sequence of steps of a given solution.
I am only an amateur programmer (forced by necessity). As my knowledge of PHP is superficial and full of blank spots, I might be a good test animal for the task of creating such a tutorial.
hello ,
View/back/blog/template.blade.php
on line 28
{!! url('/') . '/blog ' . Form::text('slug', null, ['id' => 'permalien']) !!}
to have the real front url ;)
see this http://prntscr.com/695upr
Is the .vscode root folder required in this project? I think separating IDE config from the repository is a good practice. Are there any reasons this folder exists here?
Hi! I'm a newbie.
How can I fix this?
FatalErrorException in MySqlGrammar.php line 139:
Maximum function nesting level of '100' reached, aborting!
Thanks Momo!
Now it is only possible to use e-mail as ID string.
Can you allow users to input their login name, which is usually much shorter than e-mail?
Hi there,
I'm new to laravel, mostly write node.js/javascript. I have a mac, not sure how to create a database.
Ran
$ php artisan migrate --seed
[PDOException]
SQLSTATE[HY000] [2002] No such file or directory
Then I changed the .env
file to DB_HOST=127.0.0.1
as mentioned in this SO post. Now I get a different error:
$ php artisan migrate --seed
[PDOException]
SQLSTATE[HY000] [2002] Connection refused
I have not run any mysql or postgres commands yet. What commands do I need to run in order to get rid of the Connection refused error and populate the database?
Hey guys.... how's going? Hope ok
Amazing project you have, I set everything way faster than the lazy Wordpress... =)
Well. I'm missing a few things, like
For instance, I think this might be a nice addtion =)
When I want to use filemanager and upload some images I got: Given config file (filemanager.config.js) does not exist ! Can you help?
in FormBuilder.php line 1110: Call to a member function toArray() on null
how i can fix it?
Your starter site is absolutely great. Would you consider to implement multiple roles for users - just as in a Laravel starter site from here: https://github.com/andrewelkins/Laravel-4-Bootstrap-Starter-Site
If the roles are handled like privileges, it gives much more flexibility.
Thx
In app/Providers/AppServiceProvider.php
is in the 4th line use Validator
, but there is no \Validator
class in the project. However, since Validator::resolve
is called at line 16 and somehow Illuminate/Support/Facades/Facade.php
feels responsible for it, it leads to following exception:
FatalThrowableError in Facade.php line 218:
Fatal error: Call to undefined method Illuminate\Support\Facades\Validator::resolver()
in Facade.php line 218
at Facade::__callStatic('resolver', array(object(Closure))) in /Users/marc/bude/laravel5-example/app/Providers/AppServiceProvider.php line 19
at AppServiceProvider->boot()
at call_user_func_array(array(object(AppServiceProvider), 'boot'), array()) in Container.php line 507
at Container->call(array(object(AppServiceProvider), 'boot')) in Application.php line 748
at Application->bootProvider(object(AppServiceProvider)) in Application.php line 559
at Application->register(object(AppServiceProvider)) in ProviderRepository.php line 74
...
Also, my IDE shows me that Validator
does not exist. I'm very new to Laravel. Any idea where this is coming from?
Btw, I'm trying to setup Laravel with a more sophisticated application like this demo in PHP-PM, but no luck. Only the base Laravel works so far.
I'm a bit confused by using latest
and oldest
methods in same query . would you please explain this :
public function index($n)
{
return $this->model
->with('post', 'user')
->oldest('seen')
->latest()
->paginate($n);
}
The search in the blog page does not display the item found in the blog.
Monday 11/14 Nitrous is shutting down. Signups are not currently available. Since a big chunk of the documentation references Nitrous, an alternative will have to be found. Thanks for your great work on this example!
Dont know why but i have above problem. I copied filemanager to public folder and than i have this code :
<script src="//cdn.ckeditor.com/4.5.3/standard/ckeditor.js"></script> <textarea name="editor"></textarea> <script> CKEDITOR.replace( 'editor', { filebrowserBrowseUrl: '{!! url('/public/filemanager/index.html') !!}' }); </script>
$request->session()->put('key', 'value');
When i set session in the controller I get the below error
"Session store not set on request"
Hi,
Anyone access http://localhost:8000/filemanager/index.html to manipulate files. What is your suggestion to secure it.
I have created new user from front side and getting following error.
Swift_TransportException in AbstractSmtpTransport.php line 383:
Expected response code 220 but got code "554", with message "554 5.7.1 <unknown[49.213.40.11]:52491>: Client host rejected: Access denied
Any idea how to fix this problem?
Thanks.
Hi again mate, thanks so much for your help previously, there's an issue with the filemanager.config.js file. Whenever a new file is uploaded whne using the manager, the file url is prefixed with "/filemanager/", hence it can't be previewed since the url is wrong. I changed my baseUrl in filemanager.config.js to
"baseUrl": false,
to get it to work.
Hi, I logined with Adminstrator role. I acces Administration Panel and add new user.
I get a error about miss argurment.
Can you help me to fix it?
Thanks!
Hi, first of all, thank you for this great tutorial, really help me to learn Laravel a lot faster!
I'm trying to display the hour, minute, second with the date format like this (Y/M/D H:M:S) in resources/views/front/blog/index.blade.php
I was be able to retrieve the 'created_at' from DB that looks like this "2016-05-25 15:35:51"
And when prints out using dd(posts->created_at) I can still see it's been stored as "2016-05-25 15:35:51"
But how come when I use blade template {{ post->created_at}} it only uses the date as 05/25/2016 without the hour, minute, second
Tried to use strtotime but still no luck.
RewriteEngine On
add a statement if your website is not under the root path
RewriteBase /projectname
add a statement if your website is not under the root path
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
Hi,
I'm a newcomer.
I see an issue in your program when listing the articles at the back-end with more than 10 articles and then when sorting the articles (by date, title, author...) : the paginator links disappear and you cannot go through all the articles.
I think the issue is located somewhere within BlogController@indexOrder when the request is an ajax one coming from the view "back.blog.index" : the 'links' (BlogController line 103) seems not being transferred well to the view "back.blog.index" (back.blog.index line 147)
The quick fix is to put a higher number n in paginate... but this does not solve the problem really...
Have you an idea for a definite repair ?
Thanks!
Maestroil
I just changed the design and reverted back to default bootstrap. I haven't changed anything else other than the views. It looks like everything is working, from comments, blog posts, approving comments... except the search.
If I search for Post 1
I get a blue notification saying Posts found with search Post 1
but it displays no results. If I search for jdfghgh
I get the same thing.
Hi, this is not exactly an issue, but I've been trying to implement folder access based on user in my web app using this example as a template.
I want each user to have a new folder based off the username in the userfiles directory upon creation and be able to access only that folder.
I can't get my head around how to do that and also how the functions accessMediasFolder() and accessMediasAll() are working with the filemanager. I am using ckeditor and FileManager(v 2.3.0).
Congratulations to the developer, very quite code, I'm learning so much. Thanks
FatalErrorException in BlogController.php line 153:
Class 'App\Services\Medias' not found.
I not see Medias.php in services folder.
Please fix.
Thanks
When I click an image icon on a CKeditor, a popup comes. :-) I click Browser Server then another pop up with ERROR 404 comes up. :-(
I go to http://localhost:8000/medias then again the same ERROR 404 comes up. :-(
I checked config/medias.php.
'url' => 'filemanager/index.html',
But I am not able to find 'filemanger/index.html'. What is the path for 'filemanager/index.html'?
I tried the following, but it didn't work either.
'url' => 'vendor/bestmomo/filemanager/public/filemanager/index.html',
Hello, I download new ckeditor at http://ckeditor.com/download, I choose Full package. I uncompress and put it in public folder which replace your ckeditor. But in comment part in Blog Tab, there is no anything although i login!
Can your help me?
Hi,
When I registered a new user, I got the error messages as below.
ErrorException in UserRepository.php line 53
Trying to get property of non-object
Is anything I need to edit or fix?
Thanks
Hi there,
I installed your app according your Installation notes. Front-end works fine, but when I go to /public/admin/ I get this error: FatalErrorException in Container.php line 702: Maximum function nesting level of '100' reached, aborting!
Stacktrace: http://pastebin.com/RmNYQxpg
What might be wrong?
It breaks:
[PDOException] SQLSTATE[HY000] [2002] No such file or directory
TokenMismatchException in VerifyCsrfToken.php line 67:
Hi Bestmomo, seems I've really been 'issue raising' this past few days.
I'm trying to allow the user to select an image from the file manager and I have implemented it to open the manager in a window similar to how the ckeditor picture plugin does, how ever, the select option is not showing up.
Essentially I have a button - select image - routed like you did with the medias button on your dashboard code, that opens a window based on the following script:
var urlobj;
function BrowseServer(obj)
{
urlobj = obj;
OpenServerBrowser(
'../../filemanager',
screen.width * 0.7,
screen.height * 0.7 ) ;
}
function OpenServerBrowser( url, width, height )
{
var iLeft = (screen.width - width) / 2 ;
var iTop = (screen.height - height) / 2 ;
var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes" ;
sOptions += ",width=" + width ;
sOptions += ",height=" + height ;
sOptions += ",left=" + iLeft ;
sOptions += ",top=" + iTop ;
var oWindow = window.open( url, "BrowseWindow", sOptions ) ;
}
function SetUrl( url, width, height, alt )
{
document.getElementById(urlobj).value = url ;
oWindow = null;
}
the window is loaded with my filemanager.blade view and displays the file manager porperly, but the select button is not available and I need this to get the image url. Thanks in advance!
Launching “laravel5-example”…
Something went wrong. Open IDE anyway.
Querying the GitHub API for https://github.com/bestmomo/laravel5-example...
OK - GitHub says https://github.com/bestmomo/laravel5-example is legit.
Creating project on workstation "anonym"...
OK - project "laravel5-example" created.
Cloning https://github.com/bestmomo/laravel5-example to home directory on "larav
el5-example"...
Cloning into 'laravel5-example'...
remote: Counting objects: 4495, done.
remote: Total 4495 (delta 0), reused 0 (delta 0), pack-reused 4494
Receiving objects: 100% (4495/4495), 7.72 MiB | 344.00 KiB/s, done.
Resolving deltas: 100% (1858/1858), done.
Checking connectivity... done.
OK - Cloned repository.
Executing post-create script...
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v5.2.9 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
- laravel/framework v5.2.8 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
- laravel/framework v5.2.7 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
- laravel/framework v5.2.6 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
- laravel/framework v5.2.5 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
- laravel/framework v5.2.4 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
- laravel/framework v5.2.32 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.31 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.30 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.3 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
- laravel/framework v5.2.29 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.28 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.27 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.26 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.25 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.24 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.23 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.22 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.21 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.20 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.2 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
- laravel/framework v5.2.19 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.18 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.17 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.16 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.15 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.14 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.13 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.12 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.11 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.10 requires ext-mbstring * -> the requested PHP ext
ension mbstring is missing from your system.
- laravel/framework v5.2.1 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
- laravel/framework v5.2.0 requires ext-mbstring * -> the requested PHP exte
nsion mbstring is missing from your system.
- Installation request for laravel/framework 5.2.* -> satisfiable by laravel
/framework[v5.2.0, v5.2.1, v5.2.10, v5.2.11, v5.2.12, v5.2.13, v5.2.14, v5.2.15,
v5.2.16, v5.2.17, v5.2.18, v5.2.19, v5.2.2, v5.2.20, v5.2.21, v5.2.22, v5.2.23,
v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.29, v5.2.3, v5.2.30, v5.2.31,
v5.2.32, v5.2.4, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/15-xml.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-curl.ini
- /etc/php/7.0/cli/conf.d/20-dom.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gd.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-intl.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-mcrypt.ini
- /etc/php/7.0/cli/conf.d/20-mysqli.ini
- /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-simplexml.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
- /etc/php/7.0/cli/conf.d/20-wddx.ini
- /etc/php/7.0/cli/conf.d/20-xmlreader.ini
- /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.0/cli/conf.d/20-xsl.ini
You can also run `php --ini` inside terminal to see which files are used by PH
P in CLI mode.
Exited with non-zero code.
Well, I decided to stick to this project and contribute to its development.
I am now upgrading from Laravel 4.2. I have a large amount of translations in the database, made with
https://github.com/Waavi/translation
In my opinion the necessary feature is MIXED solution (database and files), which I use very often.
What are your plans in regard of translations stored in DB?
Do you consider using https://github.com/dimsav/laravel-translatable?
Just when i open the Admin panel, I got the error
Maximum function nesting level of '100' reached, aborting!
Well, I know, the solution to increase the nesting limit or removing xdebug. But , I mean, really, why there was nesting to level above "100" ,
I got this error upon running: "php artisan vendor:publish":
PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' in /home/lon/redact/vendor/laravel/framework/src/Illuminate/Container/Container.php:736
Stack trace:
#0 /home/lon/redact/vendor/laravel/framework/src/Illuminate/Container/Container.php(736): ReflectionClass->__construct('log')
#1 /home/lon/redact/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\Container\Container->build('log', Array)
#2 /home/lon/redact/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array)
#3 /home/lon/redact/vendor/laravel/framework/src/Illuminate/Container/Container.php(845): Illuminate\Foundation\Application->make('Psr\Log\LoggerI...')
#4 /home/lon/redact/vendor/laravel/framework/src/Illuminate/Container/Container.php(800): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#5 /home/lon/redact/vendor/laravel/framework/src/Illuminate/Container/Container.php(771): Illuminate\Container\C in /home/lon/redact/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 736
I want to create a navigation with dropdown in you template.blade.php. I used class="dropdown" in bootstrap and add CDN bootstrap but it not working. Can you help me?
PS: sorry about my bad english grammar.
I cried All the night...
The tests folder was all empty. :((
Hi. I can't see any bower.json file in this repository. Have you missed it?
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.