Download the PHP package weblabormx/laravel-front without Composer

On this page you can find all versions of the php package weblabormx/laravel-front. 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-front

Front

This package was inspired on Laravel Nova.

Front is a administration panel for Laravel. It allows you to create CRUD easily in minutes. It allows to fully customize any part of the code.

Differences with Laravel Nova:

Documentation

Installation

The easiest way to install Laravel Front is using the base-laravel-front project as a base. But in case you want to install manually you can follow the next instructions.

Adapt the layout

Layout example

Basics

Laravel Front makes a use of different items that can be defined on the next way:

Resources

A resource is a class that allows you to configure all the information about the front end of a Laravel Model. Things as fields, url, buttons and more are configured on this file.

Registering resources

The front resources are saved by default on App\Front folder. You can generate a new front using the artisan command (In this case a new resource alled Page):

A new file on App\Front\ will be added, you need to configure there the fields, base url and model direction.

And then you will need to add the route. This will generate a access on /pages (It uses the plural name)

The front resources needs to have a Policy name, so please create a Policy for the model and be sure that are defined on the AuthServiceProvider (Just if you are using different folder for models as Laravel detects it automatically)

Working with resources

There are some basic variables that can be added on the resource

Funtions

index

If you need to run some algorithm just when you visit the resource you can use Index().

indexQuery

Modifying query of results

If you want to modify the results of CRUD you are able to modify it with indexQuery function

create

If you need to insert a data that is not found between the fields of your resource, you can use the create function.

Index_links

you can create a button with the function Index_links which will appear in the main view of the resource.

links

It works in the same way as index_links, the difference is that the button will appear when visiting some data from our resource.

Pagination

By default a pagination is created with 50 elements, if you want to modify the quantity you can add a new attribute called pagination on the resource

Actions to be executed after a crud action is done

You can add to any resource some actions to be done after something is done adding the next functions on the Front File

Fields

Each resource contains a fields method, where it returns an array with the list of all the fields that the resource should have.

Field column convention

As noted above, Front will "snake case" the displayable name of the field to determine the underlying database column. However, if necessary, you may pass the column name as the second argument to the field's make method:

Attributes of the fields

Showing / Hidding Fields

Others

You may chain any of these methods onto your field's definition in order to instruct Frpmt where the field should be displayed:

Dont show input if there are values set

Sometimes we would want to hide an input if we set the value on the request side or if we are using the create button on a relationship, for that we can use of function called hideWhenValuesSet, this is compatible with all inputs.

Conditional values

If we want to show an input based on the value of another input we can do it using the conditional($condition) function or conditionalOld($column, $value) functions. To this to work is required to have conditionize2 (Already loaded with the EasyJsLibrary)

The only differences between conditional and conditionalOld are the versions of conditionize2 library.

Field Panels

If your resource contains many fields, your resource "detail" screen can become crowded. For that reason, you may choose to break up groups of fields into their own "panels":

You may do this by creating a new Panel instance within the fields method of a resource. Each panel requires a name and an array of fields that belong to that panel:

Field types

All the fields available on front:

Text types

Components

Laravel Front is growing so it is normal that we are adding new types of fields and it is not documented yet, if you want to see all the types of fields that your Laravel Front project has go to vendor\weblabormx\laravel-front\src\inputs

BelongsTo

if you want to insert some data from another table you can do it with BelongsTo referencing the model that has the data you need.

Create the relationship in the model

HasMany

If your resource has a relation of many you can use the HasMany, indicating the model it relates to:

Create the relationship in the model in plural.

MorphTo

The morphTo field corresponds to a morphTo of the eloquent relation, for example if a price model has a polymorphic relation with the courses and products models, the relation can be added to the price resource in this way.

in the course and products model

Remember to follow the eloquent able structure for polymorphic relationships.

Massive editions

If you want to a relationship resource to be edited massively just add enableMassive() function.

Images

If you need to use the Image field you will have to change FILESYSTEM_DRIVER = local to FILESYSTEM_DRIVER = public in the .env file.

Sometimes you also need to change to public on the route config\filesystems.php.

Filters

You can add filters to a resource to filter the data, the filters are stored on App\Front\Filters folder. You can add filters by executing the command php artisan front:filter FilterName

Once you execute the command by first time the folder will be generated and the filter SearchFilter will be added automatically.

Once is created you need to add it on the resource page

Adding a default value

You can add a default value to the filter by adding the attribute default

Actions

You can add actions buttons to any resource, so for example if you want to resend email for a Reservation you can create a new action that will resend the email.

Just create a action on App\Front\Actions, the structure is similar to the next file

Then add on the front resource (Reservation on this case) the next function

IndexActions

IndexAction works the same as Actions, the difference is that the button will appear at the beginning of the resource, Actions appears when you visit a data.

Pages

You can create pages on the system, on the routes you need to add it easily with Route::page('PageName', '/'); and execute the command php artisan front:page PageName

You will able to change the data on app/Front/PageName

Lenses

To create lenses just create the class on app/Front/Lenses/ folder. The lenses have the next structure:

Then you need to add the lense to the resource (In this case, the Fuel Front File)

The lenses have the same functionality as the Front Resources, so you customize fully the way it works.

Customizing the theme

Sidebar

You can customize the sidebar of the Front Panel editing the file on resources/front/sidebar

Support us

Weblabor is a web design agency based in México. You'll find an overview of all our open source projects on our website.

Does your business depend on our contributions? Reach out and support us All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.


All versions of laravel-front with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
laracasts/flash Version >=3
laravelcollective/html Version >=5
opis/closure Version ^3.1
laravel/framework Version >5.5
weblabormx/file-modifier Version *
intervention/image Version >=2.5
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 weblabormx/laravel-front contains the following files

Loading the files please wait ....