Laravel: Configuring the configuration file name?

foo_constants.phpor fooConstants.php?

It seems laravel would do some kind of name conversion when you use Config::get('...'), which one do you use?

+4
source share
1 answer

foo.php

Why indicate constantsat all? The convention I used to see is single-word file names. I think that in most cases, settings like "config" will be permanent in the environment, even if they change between environments.

As an example, consider the aws / aws-sdk-php-laravel composite package. This file has a name config.phpin the package, but is published to aws.php.

rydurham/Sentinel - . .

, , - :

<?php // File: foo.php
  return [
      'sheep' => [
          'clothing' => 'wool',
          'chews_on' => 'cud',
      ],
      'wolf' => [
          'clothing' => 'fur',
          'chews_on' => 'sheep',
      ],

  ];

Config::get('foo.sheep') Config::get('foo.wolf'), . , " ", . , foo.sheep, , , , foo.wolf.

+3

All Articles