Download the PHP package radfic/gastropod without Composer

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

PLEASE NOTE THAT GASTROPOD IS STILL IN PRE-ALPHA STAGE, USE IT FOR EXPERIMENT OR IF YOU WANT TO CONTRIBUTE BUT DON'T USE IT IN A PRODUCTION ENVIRONMENT.

Gastropod a simple Laravel package, loosely inspired by Grocery Crud package for Code Igniter, and intended to speed up and ease the creation of crud based admin pages for small websites. It assumes you already have a users table and a User Eloquent model to automatically create a simple Users and Admin crud. You can then further expand it to have it manage all of your tables, and you can setup a basic, yet expandable, crud system with very few lines of code. Gastropod views are created with Bootstrap and jQuery, and it pulls it's needed scripts and css from cdns without having you to do anything. Its Auth is based on existing Laravel Auth system, only adding a table to reference which users will be admitted to the crud. But users will still login against your own users table without having to modify it.

1)Install from composer

You can install the package using composer:

2)Run the artisan install script

After that you will have to run the gastropod:install artisan command:

It will publish a number of files in your app's directory structure:

3)Run Migrations

After publishng your assets, a new migration will be present in your app's migrations folder: 2022_02_13_172741_create_gastropod_admins_table.php. It defines a new table in your database to hold reference to users allowed to access gastropod.

3)Now you should run your migrations to let artisan create the table for you, by running the artisan migrate command:

After running your migrations you should have a new table in your db: 'gastropod_admins'.

Gastropod is assuming you have a users table and a User model in your app already. To let users use Gastropod you will have to add a record in this table per user, referencing the id of the user. The first Gastropod Admin has to be set with your own means (for example with PhpMyAdmin). Once Gastropo is installed you will add more admins using it's interface.

3.1)Create First Admin

Manually add a first admin inserting a new record in gastropod_admins, referencing a users table row:

This user will now be allowed to login into gastropod. Every further user you would like to give access to Gastropod should have a related record in this table.

4)Register Gastropod Routes in RouteServiceProvider

Last step is registering gastropod routes into your app's RouteServiceProvider. To do this open the file app\Providers\RouteServiceProvider.php and add the gastropod bit after all other entries in the boot function:

Finished: check your installation!

Go to the /gastropod route to see if the login page is showing up. If it does you should login with the user related to the record you inserted before in the gastropod_admins table. If everything went fine you should see your users table now. And also a gastropod_admins table should be set up and accessible via the menu.

Create your first gastropod crud

If your Gastropod is up and running next thing you want to know is how to add models to the crud. So lets begin with an example created from a real life scenario: you want to add a users table. Gastropod is always assuming that you already have your tables set up and your models, with all relevant relations defined, in place before you try to create a new crud, so lets assume we have already our tables and models: a users table and a User model. Lets start by using the custom artisan make:gastropodController command. It will need two parameters:

After that you will have a brand new Gastropod controller in your App. Check it out since you may want to modify it:

Since our User model doesen't have relations to be considered our controller is ready as is. Now we just need to add the resource in our routes/gastropod.php file:

There we will add a user entry after the default gastropod_admins entry. This will register all the relevant resource routes for our crud. Now we just have to test it out. Point your browser to the route gastropod/users and you should be presented with the right crud.

Last thing you may want to do is update the Gastropod template view to add the user link to the navigation menu. So open the file resources\views\gastropod\template.blade.php and modify its nav bar as follows:

That's it. Happy Gastropoding!


All versions of gastropod with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
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 radfic/gastropod contains the following files

Loading the files please wait ....