Download the PHP package abdullah-mateen/laravel-helping-material without Composer

On this page you can find all versions of the php package abdullah-mateen/laravel-helping-material. 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-helping-material

[![Total Downloads](https://img.shields.io/packagist/dt/abdullah-mateen/laravel-helping-material.svg)](https://packagist.org/packages/abdullah-mateen/laravel-helping-material) [![GitHub issues](https://img.shields.io/github/issues/AbdullahMateen/laravel-helping-material.svg)](https://github.com/AbdullahMateen/laravel-helping-material/issues) [![GitHub stars](https://img.shields.io/github/stars/AbdullahMateen/laravel-helping-material.svg?style=social)](https://github.com/AbdullahMateen/laravel-helping-material) [![GitHub forks](https://img.shields.io/github/forks/AbdullahMateen/laravel-helping-material.svg?style=social)](https://github.com/AbdullahMateen/laravel-helping-material/network) [![GitHub watchers](https://img.shields.io/github/watchers/AbdullahMateen/laravel-helping-material.svg?style=social)](https://github.com/AbdullahMateen/laravel-helping-material/watchers)

Laravel Helping Material

Laravel Helping Material is a Laravel utility package that bundles common helpers, enums, model traits, API response helpers, middleware, resources, and a class-based media upload service.

It is designed for Laravel applications that need reusable project scaffolding plus simple media storage flows such as profile images, documents, temporary uploads, and database-backed media records.

Table Of Contents

Features

Requirements

The package is compatible with PHP 8.4 and PHP 8.5, and the test suite has been verified on PHP 8.5.

Installation

Install the package with Composer:

Laravel package auto-discovery registers the service provider automatically. If package discovery is disabled in your project, register the provider manually:

After installation, publish the storage symlink if you store public files:

Configuration

Publish the config when you need to customize models, strict mode, storage, or media extensions:

The config file is published to config/lhm.php.

Important config keys:

Publishing Files

The package supports Laravel vendor publishing and its own interactive publish command.

Publish config only:

Publish migrations only:

Run the interactive package publisher:

lhm:publish shows a menu and lets you publish one or more groups.

Option What it publishes Destination
All Every supported publish group Multiple paths
Config lhm.php config config/lhm.php
Enums media and user enum stubs app/Enums
Exceptions API response exception handler stub app/Exceptions
Helpers custom helper file stub app/Helpers/custom.php
Middlewares authorization middleware stub app/Http/Middleware
Migrations package migrations database/migrations
Models extended model and media model stubs app/Models
Resources Sass utility resources resources/sass
Services app media service extension stub app/Services/Media
Traits user notification trait stub app/Traits

Artisan Commands

php artisan lhm:publish

Publishes package stubs and resources into your application through an interactive checklist.

Use this when you want local editable copies of package files.

php artisan make:lhm-enum

Creates an enum using the package enum stubs. It extends Laravel's enum generator.

php artisan make:lhm-model

Creates a model using the package model stub. It extends Laravel's model generator.

Helper Functions

All package helper functions are documented in HELPER_FUNCTIONS.md.

The package autoloads its own helpers through Composer. If you publish your own helper file with php artisan lhm:publish, add that custom file to your application composer.json:

Then refresh Composer autoloading:

Basic helper examples:

Upgrade Guide

Upgrading from 2.x to 3.x requires reviewing media service usage and any published overrides. See UPGRADE-2.x-TO-3.x.md.

Enums

The package includes reusable PHP enums.

Namespace Enums
AbdullahMateen\LaravelHelpingMaterial\Enums BooleanEnum, StatusEnum
AbdullahMateen\LaravelHelpingMaterial\Enums\Media MediaDiskEnum, MediaTypeEnum
AbdullahMateen\LaravelHelpingMaterial\Enums\Notification StatusEnum
AbdullahMateen\LaravelHelpingMaterial\Enums\Temporal DayEnum, MonthEnum, TimeUnitEnum
AbdullahMateen\LaravelHelpingMaterial\Enums\User AccountStatusEnum, GenderEnum, RoleEnum, TitleEnum

Example enum casts:

Example enum helpers:

Models

The package includes:

Use the included Media model by default, or override it in config/lhm.php:

If you publish the model stubs, you can customize the app-level models:

Middleware

The package registers authorize middleware automatically.

If you publish and customize the middleware, register your custom alias in your Laravel application and use that alias instead.

Blade Directives

The service provider registers two validation helper directives.

For multiple fields:

Response Macros

The package registers response macros for common API responses.

Set LHM_SNAKE_CASE=true when you want API response keys converted to snake_case.

Media Service

The media service has two layers:

Typed services validate the resolved file type before storing. For example, ImageService only accepts images and DocumentService only accepts documents.

Storage vs Database

Store A Profile Picture And Save It To DB

Store A File Without A Model

Store A DB Row Without A Model Relation

Store Multiple Files

Generate An Image Thumbnail

Store Temporarily, Then Move Later

Move From One Disk To Another

Replace Existing Media

Delete Media

Typed Service Quick Reference

See the full scenario file at examples/media-service-api-examples.php.

Interfaces

ColorsInterface exposes color class and color code constants for consistent enum/UI color handling.

Resources

The package ships Sass utilities for colors, spacing, sizing, borders, and positioning. Publish them with:

They are copied to resources/sass.

Validation Rules

The package includes AbdullahMateen\LaravelHelpingMaterial\Rules\Throttle.

Examples

Author

Abdullah Mateen - [email protected]

License

The MIT License (MIT) 2024 - Abdullah Mateen. See LICENSE for details.


All versions of laravel-helping-material with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-curl Version *
ext-fileinfo Version *
ext-gd Version *
ext-intl Version *
ext-json Version *
ext-simplexml Version *
google/apiclient Version ^2.18
intervention/image Version ^3.3
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 abdullah-mateen/laravel-helping-material contains the following files

Loading the files please wait ...