Download the PHP package taffovelikoff/laravel-sef without Composer

On this page you can find all versions of the php package taffovelikoff/laravel-sef. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-sef

TaffoVelikoff/LaravelSef

🔗 Search engine friendly urls for your Laravel website.

Contents

🤔 Why use it?

💻 Requirements

⚙️ Installation

📚 Usage

Why use it?

There are many ways to create search engine friendly urls. For example you can use "slugs":

What if you want to loose the prefix and have this instead:

This package will help you achieve that!

Requirements

This package requires Laravel 5.8 or above.

Installation

You can install the package via composer:

Don't forget to run the migrations. There is a migration file for a "sefs" table, where all the custom urls will be stored.

Usage

👉 STEP 1: Add the HasSef trait to a model

First, you need to add the TaffoVelikoff\LaravelSef\Traits\HasSef trait to your model.

👉 STEP 2: Create/update the SEF

Now you can use the sefUrl() method to link the resource in your templates:

👉 STEP 3: Call the right controller and method

You have a few options on how to call the controller and method used to view the model.

▶️ Method 1: URL mappings in config file.

Publish the configuration file:

Add this to your routes file (typically web.php) at the VERY BOTTOM.

Say you are trying to reach https://mylaravel.com/something.

If /something is not defined in your app routes SefController@viaConfig will be called. This method will search in the "sefs" table for a record where keyword = 'something'.

If no such record exists a 404 error will be thrown.

If the record is found the method will check if the owner model type (class) exists in the routes array in config/sef.php:

▶️ Method 2: Define a $sef_method property in the model

Add this to your routes file (typically web.php) at the VERY BOTTOM.

Say you are trying to reach https://mylaravel.com/something.

If /something is not defined in your app routes SefController@viaMethod will be called. This method will search in the "sefs" table for a record where keyword = 'something'.

If no such record exists a 404 error will be thrown.

If the record is found the method will next check what is the owner model type. Say the owner model is of type "App\Product". Next the method will check for a public static property $sef_method in the App\Product model:

In this example "App\Http\Controllers\ProductController@index" is the controller and method used to view/show the model.

▶️ Method 3: Your own controller

Add this to your routes file (typically web.php) at the VERY BOTTOM.

Create your own controller:

License

This package is open-sourced software licensed under the MIT license.


All versions of laravel-sef with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package taffovelikoff/laravel-sef contains the following files

Loading the files please wait ....