Download the PHP package twenycode/laravel-blueprint without Composer

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

Laravel Blueprint

A comprehensive architecture and utilities package for Laravel applications that provides a standardized structure, core components, and common patterns to accelerate development.

Latest Version on Packagist Total Downloads

Introduction

Laravel Blueprint provides a solid foundation for building Laravel applications with a clean architecture, standardized patterns, and reusable components. It implements the repository pattern, service layer, and includes numerous utilities and base classes to streamline your development process.

Features

Requirements

Installation

You can install this package via Composer:

Configuration

Publish the configuration files:

This will publish the following configuration files:

SweetAlert Integration

This package includes integration with RealRashid/SweetAlert for beautiful flash messages and notifications.

Setup SweetAlert

  1. Make sure SweetAlert is installed:

  2. Publish SweetAlert assets:

  3. Include the SweetAlert view component in your layout:

  4. If you encounter JavaScript errors about Swal not being defined, add SweetAlert's CDN in your layout:

Using Flash Messages

The Base Controller and Resource Controllers provide built-in methods for flash messaging:

Usage

Repositories

The BaseRepository provides a comprehensive set of methods for data access:

Basic CRUD Operations

All Available Repository Methods

Model & Utility Methods:

Basic CRUD Operations:

Relationship Methods:

Status-Based Methods:

Soft Delete Methods:

Query & Search Methods:

Utility Methods:

Caching Methods (via RepositoryCacheTrait):

Services

Create service classes by extending the base service:

All Available Service Methods

Model & Utility Methods:

Basic CRUD Operations:

Relationship Methods:

Status Methods:

Soft Delete Methods:

Query & Search Methods:

Transaction Support:

Controllers

Web Resource Controllers

Create resource controllers by extending the base resource controller:

Available Controller Methods:

API Resource Controllers

For API endpoints, extend the BaseApiResourceController:

Available API Controller Methods:

Models

Create models by extending the base model:

Available Model Features:

Form Requests

Create form requests by extending the base form request:

Available Form Request Methods:

Custom Validation Rules

Composite Key Uniqueness Rule

For validating unique combinations of fields:

Helper Functions

The package provides a wide range of helper functions:

Date Helpers

Number Helpers

Text Helpers

Caching System

Repository Caching

The package includes automatic caching for repository methods:

Event Caching

For event-based caching, use the EventCacheTrait:

Model Cache Observers

Models are automatically observed for cache clearing:

Configuration

Cache Configuration

Configure caching behavior in config/tweny-blueprint.php:

Hash IDs Configuration

Configure ID hashing in config/tweny-hashids.php:

Model Configuration

Configure model behavior in config/tweny-blueprint.php:

Authorization Configuration

Configure authorization settings in config/tweny-blueprint.php:

Error Handling

All components use standardized error handling:

Extending The Package

Custom Repositories

Add specialized queries and methods to your repository classes:

Custom Services

Add complex business logic in your service classes:

Testing

The package is designed to be easily testable:

Performance Considerations

Caching Strategy

Database Optimization

Memory Management

Troubleshooting

Common Issues

  1. Cache not clearing: Ensure model observers are registered in config
  2. Hash IDs not working: Check HASHIDS_SALT environment variable
  3. Permission errors: Verify user roles and permissions setup
  4. SweetAlert not displaying: Check JavaScript console for errors

Debug Mode

Enable debug logging by adding to your .env:

Performance Monitoring

Monitor cache hit rates and query performance:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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


All versions of laravel-blueprint with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^8.0|^9.0|^10.0|^11.0
vinkla/hashids Version ^12.0
realrashid/sweet-alert Version ^7.2
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 twenycode/laravel-blueprint contains the following files

Loading the files please wait ....