Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can´t Install it my server is running PHP 5.6.25 #51

Closed
ingpedroaraujo opened this issue May 22, 2017 · 3 comments
Closed

I can´t Install it my server is running PHP 5.6.25 #51

ingpedroaraujo opened this issue May 22, 2017 · 3 comments

Comments

@ingpedroaraujo
Copy link

When I run composer install I get these errors:

Problem 1
- This package requires php >=7.0 but your PHP version (5.6.25) does not satisfy that requirement.
Problem 2
- Installation request for spatie/laravel-analytics ~2.4 -> satisfiable by spatie/laravel-analytics[2.4.0].
- spatie/laravel-analytics 2.4.0 requires php ^7.0 -> your PHP version (5.6.25) does not satisfy that requirement.

Is there a way to solve this problem more than update my php version?

Thanxs

@shirshak55
Copy link
Contributor

Actually i think you should upgrade php 7. Because laravel 5.5 will require php 7. Or check releases for old php support. But i guess you need to use old laravel like 5.2 or 5.1 .

I strongly advise to use php 7

@ozdemirburak
Copy link
Owner

I agree with @bloggervista .

However, if you'd like to stick with PHP 5.6, set the "spatie/laravel-analytics" version to "~1.4" and edit the files following their locations like below.

https://github.com/ozdemirburak/laravel-5-simple-cms/blob/43548978ae392783e9228a056c63768dae0177b1/app/Http/Controllers/Admin/DashboardController.php
https://github.com/ozdemirburak/laravel-5-simple-cms/blob/43548978ae392783e9228a056c63768dae0177b1/resources/views/admin/dashboard/index.blade.php

And you may need to either convert the functions like dashboard_box etc. to views like in the current version or add the missing functions from the https://github.com/ozdemirburak/laravel-5-simple-cms/blob/43548978ae392783e9228a056c63768dae0177b1/app/Base/Helpers/AdminHelper.php.

Or just remove spatie/laravel-analytics from composer.json and configure the DashboardController.php like below.

<?php

namespace App\Http\Controllers\Admin;

use App\Base\Controllers\AdminController;

class DashboardController extends AdminController
{
    /**
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function getIndex()
    {
            $this->model = 'User';
            return $this->redirectRoutePath('index', 'admin.fields.dashboard.invalid_setup');
    }
}

@ozdemirburak
Copy link
Owner

Closing the issue, feel free to re-open if you still have questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants