0

I am new to laravel i don't know why this ewrror happens. I have a laravel project which is working fine on online site or server, but when setup on localhost in my pc then some page are working fine but some page gives a Parse error: syntax error, unexpected end of file (0). when goes to product page it give an error like that .

.env file->


    APP_NAME=SakuraSeeds
    APP_ENV=local
    APP_KEY=base64:crdYvBTS7E1JBJ+OnCfXmiuhrcGJppg8Mug3Jhrfrtk=
    APP_DEBUG=true
    APP_LOG_LEVEL=debug
    APP_URL=http://127.0.0.1:8000/
    
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=rised5gb_sawariya
    DB_USERNAME=root
    DB_PASSWORD=
    
    BROADCAST_DRIVER=log
    CACHE_DRIVER=file
    SESSION_DRIVER=file
    SESSION_LIFETIME=120
    QUEUE_DRIVER=sync
    
    REDIS_HOST=127.0.0.1
    REDIS_PASSWORD=null
    REDIS_PORT=6379
    
    MAIL_DRIVER=smtp
    MAIL_HOST=smtp.mailtrap.io
    MAIL_PORT=2525
    MAIL_USERNAME=null
    MAIL_PASSWORD=null
    MAIL_ENCRYPTION=null
    
    PUSHER_APP_ID=
    PUSHER_APP_KEY=
    PUSHER_APP_SECRET=
    PUSHER_APP_CLUSTER=mt1
    
    SMS_AUTH_KEY=4504APWsXtZyEZJ59646b1e
    SMS_USER=sawariya
    SMS_PASS=sawariya
    SENDER=SAPLMP
    ROUTE=4
    COUNTRY=91
    RESPONSE=json
    campaign=No

this code of .htaccess


    <IfModule mod_rewrite.c>
    RewriteEngine On
    # Force SSL
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    # Remove public folder form URL
    RewriteRule ^(.*)$ public/$1 [L]
    </IfModule>
    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ http://127.0.0.1:8000/$1 [R,L]
    Header always set Content-Security-Policy "upgrade-insecure-requests;"

this code of database.php


    <?php
    return [ 
        'default' => env('DB_CONNECTION', 'mysql'),
        
        'connections' => [
            'sqlite' => [
            'driver' => 'sqlite',
                'database' => env('DB_DATABASE', database_path('database.sqlite')),
                'prefix' => '',
            ],
            'mysql' => [
                'driver' => 'mysql',
                'host' => env('DB_HOST', 'http://127.0.0.1:8000'),
                'port' => env('DB_PORT', '3306'),
                'database' => env('DB_DATABASE', 'rised5gb_sawariya'),
                'username' => env('DB_USERNAME', 'root'),
                'password' => env('DB_PASSWORD', ''),
                'unix_socket' => env('DB_SOCKET', ''),
                'charset' => 'utf8',
                'collation' => 'utf8_unicode_ci',
                'prefix' => '',
                'strict' => false,
                'engine' => null,
            ],
            'pgsql' => [
                'driver' => 'pgsql',
                'host' => env('DB_HOST', '127.0.0.1'),
                'port' => env('DB_PORT', '5432'),
                'database' => env('DB_DATABASE', 'forge'),
                'username' => env('DB_USERNAME', 'forge'),
                'password' => env('DB_PASSWORD', ''),
                'charset' => 'utf8',
                'prefix' => '',
                'schema' => 'public',
                'sslmode' => 'prefer',
            ],
            'sqlsrv' => [
                'driver' => 'sqlsrv',
                'host' => env('DB_HOST', 'localhost'),
                'port' => env('DB_PORT', '1433'),
                'database' => env('DB_DATABASE', 'forge'),
                'username' => env('DB_USERNAME', 'forge'),
                'password' => env('DB_PASSWORD', ''),
                'charset' => 'utf8',
                'prefix' => '',
            ],
        ],
        'migrations' => 'migrations',
        'redis' => [
            'client' => 'predis',
            'default' => [
            'host' => env('REDIS_HOST', '127.0.0.1'),
            'password' => env('REDIS_PASSWORD', null),
            'port' => env('REDIS_PORT', 6379),
            'database' => 0,
    ],
    ],
    ]; 

This is product-details.blade.php error image

1 Answers1

0

why those <script> tags are out of section('js') directive in product-details file? you need to put @endsection after all scripts.

enter image description here