Комментарии:
hello bro great job.. however i dont what version of laravel this is but I'm using 10.38 and there's no default public function __construct. Please Ccn help with this?
ОтветитьAwesome Video! Intersting..
Ответитьbro.. dont lie.. the intro song inspiration was from a certain hub community
ОтветитьNice! thanks
ОтветитьGetting an error on line 74,
C:\xampp\htdocs\bookstack>php artisan generate:sitemap
Symfony\Component\Debug\Exception\FatalThrowableError : syntax error, unexpected ')'
at C:\xampp\htdocs\bookstack\app\Console\Commands\GenerateSitemap.php:74
70| $url->segment(1) == $priorityUrl[0] ||
71| $url->segment(1) == $priorityUrl[1] ||
72| $url->segment(1) == $priorityUrl[2] ||
73|
> 74| ) {
75| $url->setPriority(1.0)
76| ->setLastModificationDate(Carbon::now());
77| } else {
78| $url->setPriority(0.8)
Exception trace:
1 Composer\Autoload\includeFile("C:\xampp\htdocs\bookstack\vendor\composer/../../app/Console/Commands/GenerateSitemap.php")
C:\xampp\htdocs\bookstack\vendor\composer\ClassLoader.php:322
2 Composer\Autoload\ClassLoader::loadClass("BookStack\Console\Commands\GenerateSitemap")
[internal]:0
Please use the argument -v to see more details.
C:\xampp\htdocs\bookstack>
After I fix the syntax error which I think is the Or sign "||" you put before closing the bracket.
I run the artisan command again and get an error on line 59
C:\xampp\htdocs\bookstack>php artisan generate:sitemap
Symfony\Component\Debug\Exception\FatalThrowableError : Class 'BookStack\Console\Commands\SitemapGenerator' not found
at C:\xampp\htdocs\bookstack\app\Console\Commands\GenerateSitemap.php:59
55| rename($this->path . $fileName, $this->path . 'sitemap-old-' . date('D-d-M-Y h-s') . '.xml');
56| }
57|
58| //Generate sitemap
> 59| SitemapGenerator::create('website url goes here')
60| ->hasCrawled(function (Url $url) {
61| //if url has these array values set priority more
62| $priorityUrl = [
63| 'archive',
Exception trace:
1 BookStack\Console\Commands\GenerateSitemap::handle()
C:\xampp\htdocs\bookstack\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:36
2 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
C:\xampp\htdocs\bookstack\vendor\laravel\framework\src\Illuminate\Container\Util.php:37
Please use the argument -v to see more details.
C:\xampp\htdocs\bookstack>