This is the source code for the "Laravel From Scratch" Youtube series by Traversy media. It is a website with a blog application. It also includes full authentication and file uploading.
1.0.0
The sql dump is in _SQL/lsapp.sql
Laravel from scratch website/blog application
In lesson 5 , after running $ php artisan migrate, I got a response 'Call to Undefined Method Illuminate\Database\Schema\MySqlBuilder::defaultStringLength()
Is this the full code?
public function services(){
$data=array(
'title'=>'Our Services',
'services'=>['Web Design','Programming','SEO']
);
return view('pages.services')->with($data);
Didn’t work for me on Laravel 5.8 If I use it in services page like this:
@section('content')
@endif
@endsection()
But using associative array alone without the regular array like this worked
$data=array(
'title'=>'Our Services',
);
return view('pages.services')->with($data);
so, I had to comment this part out like this
@section('content')
@endif--}}
@endsection()
And controller like this:
public function services(){
$data = array(
'title' => 'Services'
// 'services' => ['Web Design', 'Programming', 'Software Repairs']
);
return view('pages.services')->with($data);
}
}
This is the error message I get if I don’t comment those sections out
syntax error, unexpected ''services'' (T_CONSTANT_ENCAPSED_STRING), expecting ')'
Please help.... Dropdown logout and dashboard not working... I have tried every methods but not working ... I'm stuck. Please help..
Hello,
Thanks for the great tutorial,
I'm getting this error while running npm run dev
ERROR Failed to compile with 2 errors 13:34:39
error in ./resources/assets/sass/app.scss
Module build failed: Error: ENOENT: no such file or directory, scandir '/var/www/lsapp/node_modules/node-sass/vendor'
at Object.fs.readdirSync (fs.js:924:18)
at Object.getInstalledBinaries (/var/www/lsapp/node_modules/node-sass/lib/extensions.js:128:13)
at foundBinariesList (/var/www/lsapp/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/var/www/lsapp/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/var/www/lsapp/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/var/www/lsapp/node_modules/node-sass/lib/binding.js:15:30)
at Object. (/var/www/lsapp/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (module.js:641:30)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Module.require (module.js:585:17)
at require (internal/module.js:11:18)
at Object. (/var/www/lsapp/node_modules/sass-loader/lib/loader.js:3:14)
at Module._compile (module.js:641:30)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Module.require (module.js:585:17)
at require (internal/module.js:11:18)
at loadLoader (/var/www/lsapp/node_modules/loader-runner/lib/loadLoader.js:13:17)
at iteratePitchingLoaders (/var/www/lsapp/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
at iteratePitchingLoaders (/var/www/lsapp/node_modules/loader-runner/lib/LoaderRunner.js:165:10)
at /var/www/lsapp/node_modules/loader-runner/lib/LoaderRunner.js:173:18
at loadLoader (/var/www/lsapp/node_modules/loader-runner/lib/loadLoader.js:36:3)
at iteratePitchingLoaders (/var/www/lsapp/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
at iteratePitchingLoaders (/var/www/lsapp/node_modules/loader-runner/lib/LoaderRunner.js:165:10)
at /var/www/lsapp/node_modules/loader-runner/lib/LoaderRunner.js:173:18@ ./resources/assets/sass/app.scss 4:14-266
@ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss
And my log files are
2018-02-02T08_04_39_582Z-debug.log
2018-02-02T08_04_39_636Z-debug.log
Hi, I am trying to migrate the database but however i encountered this problem:
"Illuminate\Database\QueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = 2ndshoe and table_name = migrations)
at C:\xampp\htdocs\2ndshoeapp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 PDOException::("could not find driver")
C:\xampp\htdocs\2ndshoeapp\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:68
2 PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=2ndshoe", "root", "", [])
C:\xampp\htdocs\2ndshoeapp\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:68
Please use the argument -v to see more details."
I tried to look up the drivers (;extension=php_pdo.dll and ;extension=php_pdo_mysql.dll) on my php.ini but couldn't find them. I uninstalled xampp and reinstalled again and the extension still isn't there.
I was wondering if its not the extension's problem but something else?
Really appreciate if anyone could help me with this!!
it does not work for me I think the problem is that the vendor file does not exist
but when I copy it in the project folder this error in the browser show up :
"Class 'Collective\Html\HtmlServiceProvider' not found"
in : C:\xampp\htdocs\lsapp-master\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php
ckeditor not showing instead simple text area is working fine
error in console is this below
Loading failed for the <script> with source “http://itblog.dev/vendor/unisharp/laravel-ckeditor/ckeditor.js”.
create:64
ReferenceError: CKEDITOR is not defined
[Learn More]
please help cant seem to by pass this error
SQLSTATE[HY000]: General error: 1364 Field 'user_id' doesn't have a default value (SQL: insert into posts
(title
, body
, updated_at
, created_at
) values (post four,
this is post four
, 2018-04-12 12:56:57, 2018-04-12 12:56:57))WHAT am i missing?
there is no default validation in LoginController
i am learning laravel using tutorials , but it writes Your connection is not private when i open browser ****
Hello I can't upload Cover image
i'm getting an incorrect integer value error while adding cover image to the post
Illuminate \ Database \ QueryException (HY000)
SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'ivis1_1517901385.png' for column 'cover_image' at row 1 (SQL: insert intoposts
(title
,body
,user_id
,cover_image
,updated_at
,created_at
) values (post one,This is post one
, 1, filename_1517901385.png, 2018-02-06 07:16:25, 2018-02-06 07:16:25))
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.