Local server for Windows With different versions PHP & MySQL to replace XAMPP [closed]

I have been using Xampp in Windows OS as a localhost for a long time, but it does not meet my requirements. I need a server with several versions of PHP and MySQL. What server can you recommend to me, how do professional developers solve this problem, what are you using as a localhost? Please advise, Xampp with its errors takes up a lot of my time!

When installing a new version, the sites do not work at all or work incorrectly.

Auth em laravel

I’m doing an Md5 auth and it’s already checking whether the user is verified or not, but I need it to be redirected to the home page as soon as it checks.

  public function login(Request $request)
  {
     $request->validate([
     'username' => 'required',  
     'password' => 'required',
   ]);

       $user = User::findByUsername(
        $request->username,
    );

    if (!$user) {
        return back()->withErrors([
            'username' => 'Nome de usuário ou senha inválidos.',
        ]);
    }
    
   /* if($user->cnomeusua === $request->username && 
        $user->csenhusua === md5($request->password)){
        return back()->withErrors([
            'username' => 'Usuário Válido!', //return 
        ]);
    } */

    if ($user->cnomeusua === $request->username && 
        $user->csenhusua === md5($request->password)) {
        Auth::login($user); 
        //Argument 1 passed to IlluminateAuthSessionGuard::login()
        return redirect()->intended('/home');
    }
    
    return back()->withErrors([
        'username' => 'Nome de usuário ou senha inválidos.',
    ]);

    //TESTE DE ROTA
    //Auth::login($user); 
   // return redirect()->intended('/home'); 
}

public function logout()
{
    Auth::logout();  
    return redirect('/login');  
}
}

web.php

use IlluminateSupportFacadesRoute;
use AppHttpControllersAuthLoginController;

Route::get('/', function() {
  return view('auth.login'); 
})->name('login.form');

Route::get('/home', function () {
  return view('home');
})->middleware('auth');

Route::get('login', [LoginController::class, 'showLoginForm'])->name('login.form');
Route::post('login', [LoginController::class, 'login'])->name('login');
Route::post('logout', [LoginController::class, 'logout'])->name('logout'); `

Omit “” in Database Text Storage [duplicate]

I have a message system. When storing a message in the database, it should store normally and display normally. For example, “What’s Up?” -> “What’s Up?”. However, it stores and displays as “What’s Up” with a backlash after the “t”. How can I fix this so that the message is sent and displayed normally, as it is supposed to.

Here’s my code currently:

<div id="chatSection" class="consult-window-section" style="display: none;">
<?php
// Load chat messages
$chatQuery = "SELECT * FROM consultation_chat
              WHERE consultation_id = $consultation_id
              ORDER BY sent_at ASC";
$chatResult = mysqli_query($connection, $chatQuery);
?>

<div class="chat-box">
  <div class="chat-messages" id="chatMessages">
    <?php while ($chat = mysqli_fetch_assoc($chatResult)): ?>
      <div class="chat-message <?= $chat['sender_id'] == $_SESSION['id'] ? 'sent' : 'received' ?>">
        <p><?= htmlspecialchars(stripslashes($chat['message']), ENT_QUOTES) ?></p>
        <span class="timestamp"><?= date("H:i", strtotime($chat['sent_at'])) ?></span>
      </div>
    <?php endwhile; ?>
  </div>

  <form method="POST" class="chat-form" id="chatForm">
    <input type="hidden" name="consultation_id" value="<?= $consultation_id ?>">
    <input type="hidden" name="sender_id" value="<?= $_SESSION['id'] ?>">
    <input type="hidden" name="receiver_id" value="<?= $consultant['id'] ?>">
    <input type="text" name="message" placeholder="Type your message..." required autocomplete="off">
    <button type="submit">Send</button>
  </form>
</div>
if (isset($_GET['fetchMessages']) && isset($_GET['consultation_id'])) {
  $consultation_id = intval($_GET['consultation_id']);
  $user_id = $_SESSION['id'];

  $query = "SELECT * FROM consultation_chat WHERE consultation_id = ? ORDER BY sent_at ASC";
  $stmt = $connection->prepare($query);
  $stmt->bind_param("i", $consultation_id);
  $stmt->execute();
  $result = $stmt->get_result();

  while ($msg = $result->fetch_assoc()) {
    $isSender = $msg['sender_id'] === $user_id;
    $align = $isSender ? 'right' : 'left';
    $color = $isSender ? '#d2bca9' : '#e3d2c3';
    echo "<div style='text-align: $align; margin: 10px 0;'>
            <div style='display: inline-block; background: $color; padding: 10px 15px; border-radius: 10px; max-width: 70%;'>
              <p style='margin: 0; font-size: 16px; font-family: Lora;'>{$msg['message']}</p>
              <small style='font-size: 12px; color: gray;'>{$msg['sent_at']}</small>
            </div>
          </div>";
  }
  exit;
}

// Handle new message POST
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['message'])) {
  $msg = mysqli_real_escape_string($connection, $_POST['message']);
  $sender_id = intval($_POST['sender_id']);
  $receiver_id = intval($_POST['receiver_id']);
  $consult_id = intval($_POST['consultation_id']);

  $stmt = $connection->prepare("INSERT INTO consultation_chat (consultation_id, sender_id, receiver_id, message) VALUES (?, ?, ?, ?)");
  $stmt->bind_param("iiis", $consult_id, $sender_id, $receiver_id, $msg);
  $stmt->execute();

  header("Location: user_window.php?consultation_id=$consult_id&section=chat");
}

 

Changing Footer Page in WordPress according to Language set by Polylang

My theme (Novo Theme) lets you create pages as footers.

I created a footer in German and one in English and linked them in polylang.

In Polylang Settings > Custom post types and Taxonomies I checked everything including “Footers (yprm_footer_builder)”

The footer being displayed is always the one selected in Appearance -> Customize.

I tried adding

<?php
// Get the current language code
$current_language = pll_current_language();

// Check if the current language is English
if ($current_language == 'en') {
    // Display the English footer
    get_template_part('footer-en');
} elseif ($current_language == 'fr') {
    // Display the French footer
    get_template_part('footer-fr');
} else {
    // Display the default footer
    get_template_part('footer');
}
?>

to the page template as suggested by Google AI.

I also tried adding

function switch_footer_language() {
    if(pll_current_language=='th') {
        get_footer('footer_th.php');

    } elseif(pll_current_language=='en') {
        get_footer('footer_en.php');
    }
}

as suggested at Switch footer for different languages on WordPress website using Polylang plugin and Footer in multiple languages free WordPress

I couldn’t even get it to echo “DE” or “EN” depending on language, let alone to change the footer.

As far as I understand from posting on wordpress stackexchange at https://wordpress.stackexchange.com/questions/428859/changing-footer-according-to-language (question closed because outside their scope), I don’t need to load footer_en or footer_de but a page.

Different themes (like Avada Theme) apparently work by selecting the language as described here: Footer using Avada Theme in WordPress and the Polylang Plug-In but not Novo

I also contacted Envato Theme Support but got told customisation is beyond their scope. I have some programming skills and some worpress knowledge but not enough to take a good guess on where to start looking which support also didn’t want to tell me.

So, my questions are:

  1. How do I find the location where the footer page gets picked?

  2. Can I change it according to Polylang-Language using php? Would the ybove code be correct for querying the langauage set by polylang?

  3. Would I (probably) have to change each template the theme provides or is there a more central location?

Rerender Vue.js 3 Single File Component

I have Vue Single File Component on my page under <discussion-filter></discussion-filter> tag in discussion.blade.php wich renders from Laravel controller this way return View::make('discussions.discussions',['dto'=>$dto])->render(); during ajax request. Problem is that after ajax in this single file component i change inner html of <div id="discussion-wrapper"></div> (wich contains vue component) and my component desapears. How to re-render component? this.$forceUpdate() doesn’t helps.

here is my code. At first i render index.blade.php which include discussions.blade.php from a controller and it renders entire page with my app.js where i am registering and mounting component and its renders.

//discussions.blade.php
<div class="row">
    <div class="col-8">
        <div class="row">
            @foreach($dto->discussions as $discussion)
                <div class="col-6 mt-5 mb-5">
                    <x-discussioncard
                        title="{{$discussion->title}}"
                        username="{{$discussion->username}}"
                        date="{{$discussion->date}}"
                        slug="{{$discussion->slug}}"
                    ></x-discussioncard>
                </div>
            @endforeach
        </div>
    </div>
    <div class="col-4">
        <discussion-filter>
        </discussion-filter>
    </div>
</div>
//app.js
import {createApp} from 'vue/dist/vue.esm-bundler';
import SignupForm from './components/SignupForm.vue';
import LoginForm from './components/LoginForm.vue';
import DiscussionFilter from './components/DiscussionFilter.vue'

const app = createApp({});
app.component('signup-form',SignupForm);
app.component('login-form',LoginForm);
app.component('discussion-filter',DiscussionFilter);
app.mount('#app'); //#app goes from layouts/app.blade.php

Fragment of my DiscussionFilter.vue where i am sending ajax to another controller wich renders only discussions.blade.php

axios.get('/discussions/filter',{params:data})
     .then((response) => {
            $('#discussions-wrapper').html(response.data);
     }).catch((error) => console.log(error));

Problems is that template from controller renders my data in page but Vue component doesn’t renders. It seems i need something like re render or re mount. But how i can achieve this?

Uncaught Error: Call to a member function query() lite speed [closed]

Good morning, I’m a new user and I have no idea if I have violated any civil rules.
I’m not a programmer, but I own my site and I don’t know how to intervene.
Can you kindly help me with this error that my site is reporting?
Thank you very much

[STDERR] PHP Fatal error: Uncaught Error: Call to a member function
query() on null in
/home/urzt2skc/domains/samiricambi.com/public_html/classes/db/DbPDO.php:165nStack
trace:n#0
/home/urzt2skc/domains/samiricambi.com/public_html/classes/db/Db.php(376):
DbPDOCore->_query(‘ntttSELECT iso...')n#1 /home/urzt2skc/domains/samiricambi.com/public_html/classes/db/Db.php(663): DbCore->query('ntttSELECT iso…’)n#2
/home/urzt2skc/domains/samiricambi.com/public_html/classes/db/Db.php(697):
DbCore->getRow(‘ntttSELECT iso...', true)n#3 /home/urzt2skc/domains/samiricambi.com/public_html/classes/Country.php(274): DbCore->getValue('ntttSELECT iso…’)n#4
/home/urzt2skc/domains/samiricambi.com/public_html/modules/litespeedcache/classes/VaryCookie.php(234):
CountryCore::getIsoById(10)n#5
/home/urzt2skc/domains/samiricambi.com/public_html/modules/litespeedcache/classes/VaryCookie.php(76):
LiteSpeedCacheVaryCookie->init(Object(Context), Object(Cookie))n#6
/home/urzt2skc/domains/samiricambi.com/public_html/modules/litespeedcache/classe
in
/home/urzt2skc/domains/samiricambi.com/public_html/classes/db/DbPDO.php
on line 165n

how i could pass the server parameter to index and create and edit pages route? Filament

im using filament for first time

this is my server resource

<?php

namespace AppFilamentResources;

use FilamentForms;
use FilamentTables;
use AppModelsServer;
use FilamentFormsForm;
use FilamentTablesTable;
use FilamentResourcesResource;
use FilamentTablesActionsAction;
use FilamentTablesFiltersSelectFilter;
use IlluminateDatabaseEloquentBuilder;
use AppFilamentResourcesServerResourcePages;
use IlluminateDatabaseEloquentSoftDeletingScope;
use AppFilamentResourcesServerResourceRelationManagers;
use FilamentFormsComponentsSpatieMediaLibraryFileUpload;

class ServerResource extends Resource
{
    protected static ?string $model = Server::class;

    protected static ?string $navigationIcon = 'heroicon-o-server';

    protected static ?string $navigationLabel = 'Servers';
    protected static ?int $navigationSort = 1;

    protected static ?string $navigationGroup = 'Application';

    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                SpatieMediaLibraryFileUpload::make('Image')
                    ->label('Server Image')
                    ->collection('image')
                    ->image()
                    ->acceptedFileTypes(['image/jpeg', 'image/png', 'image/jpg'])
                    ->maxSize(30720) // 30MB
                    ->columnSpan(6)
                    ->required(),

                FormsComponentsTextInput::make('name')
                    ->required()
                    ->columnSpan(6)
                    ->maxLength(255),

                FormsComponentsSelect::make('type')
                    ->label('Server Type')
                    ->columnSpan(6)
                    ->options([
                        'free' => 'Free',
                        'premium' => 'Premium',
                    ])
                    ->native(false)
                    ->required(),

                FormsComponentsSelect::make('status')
                    ->columnSpan(6)
                    ->options([
                        'active' => 'Active',
                        'inactive' => 'Inactive',
                    ])
                    ->native(false)
                    ->required(),
                FormsComponentsToggle::make('android')
                    ->columnSpan(4),

                FormsComponentsToggle::make('ios')
                    ->columnSpan(4),

                FormsComponentsToggle::make('macos')
                    ->columnSpan(4),

                FormsComponentsToggle::make('windows')
                    ->columnSpan(4),
            ])
            ->columns(1); // Forces each field to be in a separate line
    }

    public static function table(Table $table): Table
    {
        return $table
            ->columns([
                TablesColumnsSpatieMediaLibraryImageColumn::make('Image')
                    ->collection('image')
                    ->label('Image')
                    ->square(),
                TablesColumnsTextColumn::make('name')
                    ->searchable(),
                TablesColumnsTextColumn::make('platforms')
                    ->label('Platforms')
                    ->badge()
                    ->color(fn($state) => match ($state) {
                        'Android' => 'success',  // Green
                        'iOS' => 'info',         // Blue
                        'macOS' => 'gray',       // Gray
                        'Windows' => 'warning',  // Yellow
                        default => 'secondary',  // Default color
                    })
                    ->state(function (Server $record) {
                        $platforms = [];

                        if ($record->android) {
                            $platforms[] = 'Android';
                        }
                        if ($record->ios) {
                            $platforms[] = 'iOS';
                        }
                        if ($record->macos) {
                            $platforms[] = 'macOS';
                        }
                        if ($record->windows) {
                            $platforms[] = 'Windows';
                        }

                        return $platforms ?: ['None'];
                    }),
                TablesColumnsTextColumn::make('type')
                    ->badge()
                    ->state(function (Server $record) {
                        return match ($record->type) {
                            'free' => 'Free',
                            'premium' => 'Premium',
                            default => 'Unknown',
                        };
                    })
                    ->color(fn($record) => match (strtolower($record->type)) {
                        'free' => 'success',
                        'premium' => 'warning',
                    })
                    ->sortable(),
                TablesColumnsTextColumn::make('status')
                    ->badge()
                    ->state(function (Server $record) {
                        return match ($record->status) {
                            'active' => 'Active',
                            'inactive' => 'Inactive',
                            default => 'Unknown',
                        };
                    })
                    ->color(fn($record) => match (strtolower($record->status)) {
                        'active' => 'success',
                        'inactive' => 'danger',
                        default => 'gray', // Default color in case there's an unexpected value
                    })
                    ->sortable(),
                TablesColumnsTextColumn::make('created_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
                TablesColumnsTextColumn::make('updated_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
            ])
            ->filters([
                SelectFilter::make('status')
                    ->options([
                        'active' => 'Active',
                        'inactive' => 'Inactive',
                    ])
                    ->placeholder('All')
                    ->default(null)
                    ->label('Status'),
                SelectFilter::make('type')
                    ->options([
                        'free' => 'Free',
                        'premium' => 'Premium',
                    ])
                    ->placeholder('All')
                    ->default(null)
                    ->label('Type'),
                SelectFilter::make('platform')
                    ->options([
                        'android' => 'Android',
                        'ios' => 'iOS',
                        'macos' => 'macOS',
                        'windows' => 'Windows',
                    ])
                    ->query(function (Builder $query, array $data) {
                        if (!empty($data['values'])) {
                            foreach ($data['values'] as $platform) {
                                $query->orWhere($platform, true);
                            }
                        }
                    })
                    ->placeholder('All')
                    ->multiple()
                    ->label('Platform'),
            ])
            ->actions([
                TablesActionsEditAction::make()
                    ->iconButton(),
                TablesActionsDeleteAction::make()
                    ->action(function (Server $record) {
                        $record->delete();
                    })
                    ->requiresConfirmation()
                    ->modalHeading('Delete Server')
                    ->modalDescription('Are you sure you want to delete this server?')
                    ->iconButton()
                    ->modalSubmitActionLabel('Delete'),
                TablesActionsAction::make('view-sub-servers')
                    ->url(fn(Server $record) => route('filament.admin.resources.server.{server}.sub-servers.index', ['server' => $record->id]))
                    ->icon('heroicon-o-server')
                    ->iconButton()
                    ->color('primary'),
            ])
            ->bulkActions([
                TablesActionsBulkActionGroup::make([
                    TablesActionsDeleteBulkAction::make(),
                ]),
            ]);
    }

    public static function getRelations(): array
    {
        return [
            RelationManagersSubServersRelationManager::class,
        ];
    }

    public static function getPages(): array
    {
        return [
            'index' => PagesListServers::route('/'),
            'create' => PagesCreateServer::route('/create'),
            'edit' => PagesEditServer::route('/{record}/edit'),
            'view-sub-servers' => PagesViewSubServers::route('/{record}/sub-servers'),
        ];
    }
}

as u can see i have a btn that redirects to that server sub servers resource

TablesActionsAction::make('view-sub-servers')
                    ->url(fn(Server $record) => route('filament.admin.resources.server.{server}.sub-servers.index', ['server' => $record->id]))
                    ->icon('heroicon-o-server')
                    ->iconButton()
                    ->color('primary'),

now in my sub server resource

protected static ?string $slug = 'server/{server}/sub-servers';

i have set the url slug also to receieve a parameter as server

and set the query builder to get that parameter and fetch sub servers of that server id

public static function getEloquentQuery(): Builder
    {
        $serverId = request()->route('server');
        return parent::getEloquentQuery()->where('server_id', $serverId);
    }

now when i open a specific server sub server resource page

i get this error

Missing required parameter for [Route: filament.admin.resources.server.{server}.sub-servers.edit] [URI: admin/server/{server}/sub-servers/edit] [Missing parameter: server].

i tried commenting the edit page in getPages

public static function getPages(): array
    {
        return [
            'index' => PagesListSubServers::route('/'),
            'create' => PagesCreateSubServer::route('/create'),
            // 'edit' => PagesEditSubServer::route('/edit'),
        ];
    }

// TablesActionsEditAction::make(),

but then i got this error?

Missing required parameter for [Route: filament.admin.resources.server.{server}.sub-servers.index] [URI: admin/server/{server}/sub-servers] [Missing parameter: server].

now my question is how to i can pass parameters to index,create, edit pages?

Sub Server Resource code

<?php

namespace AppFilamentResources;

use AppFilamentResourcesSubServerResourcePages;
use AppFilamentResourcesSubServerResourceRelationManagers;
use AppModelsSubServer;
use FilamentForms;
use FilamentFormsForm;
use FilamentResourcesResource;
use FilamentTables;
use FilamentTablesTable;
use IlluminateDatabaseEloquentBuilder;
use IlluminateDatabaseEloquentSoftDeletingScope;
use IlluminateSupportFacadesLog;

class SubServerResource extends Resource
{
    protected static ?string $model = SubServer::class;

    protected static ?string $navigationIcon = 'heroicon-o-server';
    protected static bool $shouldRegisterNavigation = false;

    protected static ?int $navigationSort = 2;
    protected static ?string $navigationGroup = 'Application';

    protected static ?string $slug = 'server/{server}/sub-servers';

    public static function getEloquentQuery(): Builder
    {
        $serverId = request()->route('server');
        return parent::getEloquentQuery()->where('server_id', $serverId);
    }

    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                FormsComponentsSection::make('Sub Server')
                    ->description('Enter the sub server details')
                    ->schema([
                        FormsComponentsSelect::make('Server')
                            ->relationship('server', 'name')
                            ->required()
                            ->columnSpan(6)
                            ->searchable()
                            ->preload()
                            ->reactive(),

                        FormsComponentsTextInput::make('name')
                            ->required()
                            ->columnSpan(6)
                            ->maxLength(255),

                        FormsComponentsSelect::make('status')
                            ->columnSpan(6)
                            ->options([
                                'active' => 'Active',
                                'inactive' => 'Inactive',
                            ])
                            ->native(false)
                            ->required(),
                    ])
                    ->columns(1),
            ]);
    }

    public static function table(Table $table): Table
    {
        return $table
            ->columns([
                TablesColumnsTextColumn::make('server.name')
                    ->label('Server Name'),
                TablesColumnsTextColumn::make('name')
                    ->sortable()
                    ->searchable(),
                TablesColumnsTextColumn::make('status')
                    ->badge()
                    ->state(function ($record) {
                        return match ($record->status) {
                            'active' => 'Active',
                            'inactive' => 'Inactive',
                            default => 'Unknown',
                        };
                    })
                    ->color(fn($record) => match (strtolower($record->status)) {
                        'active' => 'success',
                        'inactive' => 'danger',
                        default => 'gray', // Default color in case there's an unexpected value
                    })
                    ->sortable(),

                TablesColumnsTextColumn::make('created_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
                TablesColumnsTextColumn::make('updated_at')
                    ->dateTime()
                    ->sortable()
                    ->toggleable(isToggledHiddenByDefault: true),
            ])
            ->filters([
                //..
            ])
            ->actions([
                // TablesActionsEditAction::make(),
            ])
            ->bulkActions([
                TablesActionsBulkActionGroup::make([
                    TablesActionsDeleteBulkAction::make(),
                ]),
            ]);
    }

    public static function getRelations(): array
    {
        return [
            //
        ];
    }

    public static function getPages(): array
    {
        return [
            'index' => PagesListSubServers::route('/'),
            'create' => PagesCreateSubServer::route('/create'),
            // 'edit' => PagesEditSubServer::route('/edit'),
        ];
    }
}

Queued email jobs return success but do not send email, sometimes

I am using a database queue to send email. Most of the time it works, but sometimes the email fails to send, but the job completes successfully.

Here is some relevant code:

In the controller:

      Mail::to('[email protected]')->send(new NewPatientNotification("test", "email.newpatient"));

The mailable

class NewPatientNotification extends Mailable implements ShouldQueue
{
  use Queueable, SerializesModels;

  public function __construct(public string $subj, public string $viewName)
  {
  }

  public function build()
  {
    log_info("New Patient Notification Build");
    return $this->subject($this->subj)->view($this->viewName);
  }
}

I increased the logging, specifically logging on the MessageSent event as so:

  public function handle(MessageSent $event): void
  {
    log_info("MessageSent: Message-ID: " . $event->sent->getSymfonySentMessage()->getMessageId() . " SMTP Dialog: " . $event->sent->getSymfonySentMessage()->getDebug());
  }

For messages that get sent, the log contains something like this:

LOG: [user_id=0]AppListenersLogSentMessage@handle(479): MessageSent: Message-ID: [email protected] SMTP Dialog: [2025-04-05T00:07:59.939621-04:00] > NOOP
[2025-04-05T00:07:59.984086-04:00] < 250 2.0.0 OK
[2025-04-05T00:07:59.984156-04:00] > MAIL FROM:<[email protected]>
[2025-04-05T00:08:00.033643-04:00] < 250 2.1.0 Sender OK
[2025-04-05T00:08:00.033694-04:00] > RCPT TO:<[email protected]>
[2025-04-05T00:08:00.078450-04:00] < 250 2.1.5 Recipient OK
[2025-04-05T00:08:00.078487-04:00] > RCPT TO:<[email protected]>
[2025-04-05T00:08:00.123072-04:00] < 250 2.1.5 Recipient OK

For messages that fail to send, the SMTP dialog is empty

LOG: [user_id=0]AppListenersLogSentMessage@handle(479): MessageSent: Message-ID: [email protected] SMTP Dialog: ;

The only thing I noticed is the emails that are sent tend to take 500ms or more. The ones that don’t send tend to be 100ms or less. Apologies for crossposting this in https://laracasts.com/discuss/channels/laravel/queued-emails-are-intermittently-not-sent-but-jobs-are-completing-successfully

WordPress editor custom styles

Using the following code I’m trying to add some CSS to the default Gutenberg editor in WordPress:

function editor_style() {
    add_theme_support( 'editor-styles' );
    add_editor_style( 'editor-style.css' );
}
add_action( 'after_setup_theme', 'editor_style' );

While this works, it also makes the editor look weird:

enter image description here

It seems as if all styles are removed other than those from my custom stylesheet. Is this intentional? I’m using Bootstrap in my theme. Should I include this here too?

WordPress link by default only for gallery images

The following code adds a link to the file itself when inserting an image using the WordPress editor:

function my_new_default_image_settings() {
    update_option( 'image_default_link_type', 'file' );
}
add_action( 'after_setup_theme', 'my_new_default_image_settings' );

Currently all my images are getting a link. Is it possible to only have this executed when adding a gallery?

How can I create commands like Laravel artisan?

I want to create my own framework in PHP which allow me to create rest APIs more easily.

I want add some commands like in Laravel. For example in Laravel we write

php artisan make:controller

and it creates a controller. I want to make it so I can type

php <name_of_my_framework> make:gateway 

and it will create GateWay.php file and add class and namespaces in it. How can I make this logic?

Determine provider/hoster of domains [closed]

For example, I have 3 domains: a.com, b.com and c.com. How can I use PHP to find out which of them are hosted by the same provider? I don’t need to know the name of the provider. I just need a criterion to recognize which domains are hosted by the same provider. I cannot use the IP address, as a provider can operate several servers with different IPs.

Changing button name in snipeit

I’m using Snipe-IT on an Ubuntu server, and I want to change the terminology shown in the dashboard:

Change Checkout → Transfer

Change Checkin → Return

I tried editing the language file located at:
/var/www/html/snipe-it/resources/lang/en-US/general.php
Specifically, I updated the var array like this:
‘checkout’ => ‘Transfer :item_type’,
‘checkin’ => ‘Return :item_type’,

However, the changes are not reflected in the dashboard UI. I’ve also cleared browser cache and restarted the nginx service, but the old labels still show up.

I’m using nginx, not Apache, and everything else in the app is working fine.

Questions:
Is there a specific cache I need to clear in Laravel or Snipe-IT to apply these translation changes?

Are there any other files or keys I should update to make this change across the entire dashboard?

Is it possible to automate this change throughout the app?

Environment:
Snipe-IT version:v8.0.4 build 17196 (gc29bdbdac)

OS: Ubuntu

Web server: nginx

Thanks in advance for any help!