Download the PHP package grafite/builder without Composer

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

Grafite Builder

Grafite has archived this project and no longer supports or develops the code. We recommend using only as a source of ideas for your own code.

Builder - A handful of tools for Rapid Laravel Development

Build Status Packagist license

This is a set of tools to help speed up development of Laravel apps. You can start an app with various parts prewritten (Users, User Meta, Roles, Teams). And it comes with a powerful FormMaker which can generate form content from tables, and objects. It can generate epic CRUD prototypes rapidly with full testing scripts prepared for you, requiring very little editing. It also provides an elegant Cryptography tool which is URL friendly. Finally it brings along some friends with LaravelCollective as a vendor.

Author(s):

General Requirements

  1. PHP 7.1.3+
  2. OpenSSL

Compatibility and Support

Laravel Version Package Tag Supported
5.7.x 2.5.x no
5.6.x 2.4.x no
5.5.x 2.3.x no
5.4.x 2.2.x no
5.3.x 2.0.x - 2.1.x no
5.1.x - 5.2.x 1.9.x no

Installation

Start a new Laravel project:

or

Then run the following to add the Grafite Builder

Time to publish those assets! Grafite Builder uses CrudMaker and FormMaker which have publishable assets.

or

You now have Grafite Builder installed. Try out the Starter Kit.

Application Starter Kit

!!! warning "Make sure you followed the getting started instructions!"

Grafite Builder provides an elegant solution for starting an application by building the most basic views, controllers, models and migrations for your application. No need to use the php artisan make:auth because now you can easily start your whole application with this single command:

!!! tip "BUT, before we do that lets get a few things set up."

In order to make use of the starter kit you will need to modify some files. Check out the modifications below:

Add the following to your app/Http/Kernel.php in the $routeMiddleware array.

If you don't want to worry about email activation then remove this from the route's middleware array:

Update the App\User::class in: 'config/auth.php' and 'database/factories/UserFactory.php' to this:

Add the following to 'app/Providers/AuthServiceProvider.php' in the boot method

Add the following to 'app/Providers/EventServiceProvider.php' in the $listen property

You will want to create an sqlite memory test database in the config/database.php

Add the following line to the 'phpunit.xml' file

Regarding Email Activation

The Starter kit has an email activation component added to the app to ensure your users have validated their email address. You can disable it by removing the active middleware from the web routes. You will also have to disable the Notification but it won't cause any problems if you remove the email activation.

For Laravel 5.2 and later

You will also need to set the location of the email for password reminders. (config/auth.php - at the bottom)

Things to note

You may try and start quickly by testing the registration but please make sure your app's email is configured or it will throw an exception. You can do this in the .env file easily by setting it to 'log' temporarily

Last Steps

Once you've added in all these parts you will want to run the starter command!

Then you'll have to refresh the list of all classes that need to be included in the project.

Then you'll need to migrate to add in the users, user meta, roles and teams tables. The seeding is run to set the initial roles for your application.

Once you get the starter kit running you can register and login to your app. You can then you can visit the settings section of the app and set your role to admin to take full control of the app.

What Starter Publishes

Controllers

Grafite Builder updated the basic controllers to handle things like creating a profile when a user is registered, as well as setting default return routes to dashboard etc. It also provides contollers for handling profile modifications and pages, team management etc. The admin controller handles the admin of users, modifying a user provided the user has the admin role.

Middleware

Grafite Builder overwrites the default middleware due to changes in the redirects. It also provides the Admin middleware for route level protection relative to roles.

Requests

There are requests provided for handling the creation of Teams and updating of all components. Here we integrate the rules required that are able to run the validations and return errors. (If you're using Grafite Builder FormMaker Facade then it will even handling accepting the errors and highlighting the appropriate fields.)

Routes

Given that there are numerous routes added to handle teams, profiles, password etc all routes are overwritten with the starter kit.

Config

The permissions config file is published, this is a way for you to set access levels and types of permissions Roles can have

Events

The events for various actions.

Listeners

The event listeners for various actions.

Models

Models are obvious, but when we then integrate Services below which handle all the buisness logic etc which make the calls to the models we implement SOLID practices, the Controller, Console or other Service, which calls the service only accesses the model through it. Once these have been integrated please ensure you delete the User.php model file and ensure that you have followed the installation and config instructions.

Notifications

These are all our emails that we need to send out to the users in the application. These are amazing since they use the power of Laravel's notifcation component.

Services

Service structure allows us to keep the buisness logic outside of the models, and controllers. This approach is best suited for apps that may wish to integrate an API down the road or other things. It also allows for a highly testable structure to the application.

Database

Please ensure that all migrations and seeds are run post installation. These seeds set the default roles available in your application.

Views

The views consist of as little HTML as possible to perform the logical actions. These are intended to be the most basic, and all of which are intended to be modified.

Tests

Grafite Builder starter kit provides the basic unit tests for each of its own parts. This provides some great examples of testing for building an application quickly.

After Setup

Dashboard access

The application dashboard is found by browsing to the /dashboard endpoint. The default admin user login credentials are:

User

The user model is expanded with Grafite Builder Starter Kit. It adds to the basic user model: roles, teams, and user meta. The relationships are as follows:

It also provides the following methods:

Middleware

Admin

The Admin middleware acts as a tool for setting admin level permissions on the routes or controller level.

This simple addition to a route will ensure the user has access to the admin level, if not it will return them from where they came.

Active

The Active middleware acts checks if the account as been activated by accessing the activate url with the emailed token.

This simple addition to a route will ensure the user has an activated account, if not it will redirect them to the /active page so they can request another activation token if necessary.

Roles

The Roles middleware allows you to set custom roles for your routes.

Permissions

The Permissions middleware allows you to set custom permissions (a subset of roles) for your routes

You can set permissions in the config/permissions.php

Bootstrap UI

!!! Tip "Bootstrap Version 4"

If you feel like opting in for the Application starter kit. You also have a great bootstrapping option for the views. You can blast through the initial building of an app and hit the ground running!

!!! Tip "This will also ensure that your webpack file is prepared to run"

What Boostrap Publishes

The command will overwrite any existing files with the bootstrap version of them:

Application Activities

Sometimes its handy to know what your users are up to when they browse your site or application. The Activity kit gives you everything you need to track your users and their every action. The middleware does most of it for you, but your welcome to customize it to fit your needs.

Setup

Add to your config/app.php the following:

Facades

Provides the following tool for in app features:

Helper

Application Features

Sometimes what we need is a simple way to toggle parts of an app on and off, or hey, maybe the client wants it. Either way, using the feature management kit can take care of all that. Now you or your clients can toggle signups on an off, or any other features in the app. Just utilize the blade or helper components to take full control of your app.

Setup

You may want to add this line to your navigation:

Add to your config/app.php the following:

Add this to the app/Providers/RouteServiceProvider.php in the mapWebRoutes(Router $router) function:

Facades

Provides the following tool for in app features:

Blade
Helper
What Features Publishes:

The command will overwrite any existing files with the features version of them:

Application Logs

The logs tool simply add a view of the app logs to your admin panel. This can be of assistance durring development or in keeping an application in check.

Setup

You may want to add this line to your navigation:

Add this to the app/Providers/RouteServiceProvider.php in the mapWebRoutes(Router $router) function:

Application Notifications

Grafite Builder's notifications will build a basic controller, service, and views for both users and admins so you can easily notifiy your users, in bulk or specifically.

Setup

You may want to add this line to your navigation:

Add this to the app/Providers/RouteServiceProvider.php in the mapWebRoutes(Router $router) function:

Facades

Provides the following tool for in app notifications:

Flags can be any bootstrap alert: default, info, success, warning, danger

What Notifications Publishes:

The command will overwrite any existing files with the notification version of them:

Forge Integration

The FORGE component provides you with access to the FORGE API in your admin panel. Rather than having to log into FORGE for each adjustment, now you can simply log into your own application and in the admin panel adjust the scheduler, or workers on your server configuration.

Requires
Setup

You may want to add this line to your navigation:

Add this to the app/Providers/RouteServiceProvider.php in the mapWebRoutes(Router $router) function:

You will see a line like: ->group(base_path('routes/web.php'));

You need to change it to resemble this:

Add these to the .env:

Application API

If you feel like opting in for the Laracogs starter kit. You can also easily build in an API layer. Running the grafite:api command will set up the bare bones components, but you can also use the API tools as a part of the CRUD now by using the --api option.

Requires
Setup

Essentially you want to do all the basic setup for JWT such as everything in here: Then follow the directions regarding installation on: https://github.com/tymondesigns/jwt-auth/wiki/Installation

Add this to the app/Providers/RouteServiceProvider.php file in the mapWebRoutes(Router $router) function:

Add to the app/Http/Kernal.php under routeMiddleware:

Add to except attribute the app/Http/Middleware/VerifyCsrfToken.php (You also have to do this for CRUDs you add):

If you use Apache add this to the .htaccess file:

Also update your jwt config file and set the user to:

What API publishes

The command will overwrite any existing files with the api version of them:

Application Queue

Horizon is amazing if you've got a redis instance configured and are running your queue through that, but not all apps need that nor do that have to start there. If you've got a database driven queue and are looking for an easy management component to handle job retrying and cancellations then this will be a perfect addition to your app.

Setup

Add this to the app/Providers/RouteServiceProvider.php in the mapWebRoutes(Router $router) function:

You may want to add this line to your navigation:

Social Media Logins

If you're looking to offer social media logins on your application and want a simple way to get started then look no further. Simply run the command and follow the steps below and you'll have GitHub login out of the box. Integrating Facebook etc afterward is easy when you look at the code base.

Requires
Setup

The next step is to prepare your app with socialite:

Add this to your app config under providers:

Add this to your app config under aliases:

Add require base_path('routes/socialite.php'); to the app/Providers/RouteServiceProvider.php in the mapWebRoutes(Router $router) function:

Finally set the access details in the services config:

What Socialite publishes

The command will overwrite any existing files with the socialite version of them:

Application Billing

If you feel like opting in for the Grafite Builder starter kit. You can also get your app's billing handled quickly with Grafite Builder billing command and Laravel/Cashier. Grafite Builder's billing will build a basic controller, views etc so you can stay focused on what makes your application amazing!

Requires
Setup

You have to modify the app/Providers/RouteServiceProvider.php in the mapWebRoutes(Router $router) function:

You will see a line like: ->group(base_path('routes/web.php'));

You need to change it to resemble this:

Add these to the .env:

Add this to the app/Providers/AuthServiceProvider.php:

And for the config/services.php you will want yours to resemble:

Finally run migrate to add the subscriptions and bind them to the user meta:

You will also want to update your webpack mix file to resemble (webpack.mix.js):

After Setup

You may want to add this line to your navigation:

Notes

You may want to switch the line in the view vendor.receipt to:

We do this because rather than bind the billing to the User, we bound it to the UserMeta.

What Billing Publishes

The command will overwrite any existing files with the billing version of them:

Accounts

The Account service is a tool for handling your subscription details, meaning you can limit your applications based on various clauses using the plans config. You're free to set these plan details restricting things within a billing cycle or just in general.

These are relative to billing only. They provide extra tools for handling restrictions in your application based on the plan the user subscribed to. Unless you implment the cashier billing system with the UserMeta structure provided by Laracogs it will not benefit you.

Config

This is the basic config for config/plans.php. This is for a single plan, either be subscribed or not.

!!! tip "Remember you need to have corresponding plans on Stripe ex. app_basic by default"

Multiple Plans

In this config you can define multiple plans which can have different rules per plan. By default the kit uses a single plan. You can define this in the env as mentioned above. But if you want to do multiple plans you can change the following code:

  1. Line 45 of the BillingController.php change config('plans.subscription') to: $payload['plan']
  2. Add name, and stripe_id to the config

  3. Then add the following code in resources/views/billing/subscribe.blade.php above the card form include:

!!! tip "You may also want to add a component to your app to allow users to switch plans. You can use the swap method to achieve this: auth()->user()->meta->subscription(config('plans.subscription_name'))->swap($request->plan)"

Service Methods


currentBillingCycle()

By using this method at the beginning and chaining another method after it you enable the restriction of the query to be performed but restricting itself to the current billing cycle.


canAccess($area)

Returns a boolean if the user can enter


cannotAccess($area)

Returns a boolean if the user cannot enter


getClause($key)

Returns the specified clause of the plans


getLimit($model)

Returns the specified limit of a model or pivot table


withinLimit($model, $key = 'user_id', $value = {user's id})

Confirms that the specified model only has the specified amount collected by the $key and $value.


creditsUsed($model, $key = 'user_id', $value = {user's id})

Reports back the specified amount collected by the $key and $value.


creditsAvailable($model)

Returns the number of credits remaining based on the config and the previous method.


clause($key, $method, $model = null)

Performs a custom method with rules defined by the clause name in the config. The Closure method in this is provided with the following parameters: $user, $subscription, $clause, $query

License

Grafite Builder is open-sourced software licensed under the MIT license

Bug Reporting and Feature Requests

Please add as many details as possible regarding submission of issues and feature requests

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of builder with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.3
doctrine/dbal Version ^2.5
illuminate/support Version ^5.7
grafite/crudmaker Version ^1.4
grafite/formmaker Version ^1.3
grafite/crypto Version ~1.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 grafite/builder contains the following files

Loading the files please wait ....