content

In the category Divers

1 year ago

How can I install TyphoonCms

tl;dr

In this post, I will explain to you how you can install me in few steps

Updated for version 0.5.x

Hello, Im' glad you want using me in your project.

Bellow I give you the steps to follow to install me.

Are you ready, let's go !

Step 1 - Install a fresh Laravel application

For that, you can

laravel new your-awesome-project-name

or

composer create-project laravel/laravel your-awesome-project-name

Enter in your project :

cd your-awesome-project-name

Step 2 - Install TyphoonCms via composer

composer require happytodev/typhoon

As Typhoon, use filament-navigation plugin from Ryan Chandler and as I adapted it (fork is here https://github.com/happytodev/filament-navigation) to be compliant with Orbit (also from Ryan) and as the PR is waiting approval from Ryan, you have to set an another settings before install Typhoon.

Follow these steps :

    "repositories": [
        {
          "type": "vcs",
          "url": "https://github.com/happytodev/filament-navigation"
        }
    ],
    "require": {
      "ryangjchandler/filament-navigation": "dev-main"
    }

Save the composer.json file and run composer update

Alternatively, if you don't add above require block in your composer.json file, you can install the package via composer:

composer require ryangjchandler/filament-navigation=dev-main

To use Orbit with filament-navigation, you have to add a key to your .env file :

FILAMENT_NAVIGATION_DB_ENGINE=orbit

As you edit the .env file, give a name to your website by adding the following key to your .env file

TYPHOONCMS_NAME="MyWebsite"

Always in your .env file replace following :


DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=

by :

DB_CONNECTION=orbit

Step 3 - Use the typhoon:install command

TyphoonCms comes with a command which help to install the Cms.

You just have to launch it :

php artisan typhoon:install

When the script ask you User model file already exists. Do you want to overwrite it? (yes/no) [no]: you can answer yes. It will modify the default User model to adapt it to use Orbit instead classic database like for example MySQL.

Step 4 - Give your user the admin rights

Last thing, go to the content\usersfolders and edit with your favorite editor the first user, usually it is the file 1.md:


---

id: 1
name: 'John Doe'
email: john@doe.com
password: $2y$10$0wdxKSl7ksxk8yrTgU8!K90oLmMq2eJ20pwUBSu0ICMWpc959DpTqm
is_admin: 0
created_at: 2022-05-27T18:39:22+00:00
updated_at: 2022-05-28T09:04:57+00:00

---

modify this line is_admin: 0 to this one is_admin: true :


---

id: 1
name: 'John Doe'
email: john@doe.com
password: $2y$10$0wdxKSl7ksxk8yrTgU8!K90oLmMq2eJ20pwUBSu0ICMWpc959DpTqm
is_admin: true
created_at: 2022-05-27T18:39:22+00:00
updated_at: 2022-05-28T09:04:57+00:00

---

Step 5 - Schedule / unschedule posts & Crontabs

Typhoon has the possibity to published or unpublished posts by setting date and hour of action. It needs you configure your crontab as explained in laravel documentation.

The following must be adapted to your system, but on a classical Linux :

crontab -e
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

That's it ! Connect to the admin dashboard

Go to the your-awesome-project-name.com/admin and enter the credentials you provided during the installation.

Et voilà !

Tags

No tag

7

Posts

1

Comments

Typhoon Cms picture

Typhoon Cms

I'm a new CMS, based on Tall stack with help of FilamentPhp and OrbitPhp with wich I haven't classical database. My engine is flat files !

My dad is @happytodev and he is proud of me !

Comments

No comment until now